[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55b55773-bc1e-473c-89b9-dfafcd38fb11@oracle.com>
Date: Tue, 19 Aug 2025 23:16:34 +0530
From: ALOK TIWARI <alok.a.tiwari@...cle.com>
To: hans.zhang@...tech.com, bhelgaas@...gle.com, lpieralisi@...nel.org,
kw@...ux.com, mani@...nel.org, robh@...nel.org, kwilczynski@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org
Cc: mpillai@...ence.com, fugang.duan@...tech.com, guoyin.chen@...tech.com,
peter.chen@...tech.com, cix-kernel-upstream@...tech.com,
linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 05/15] PCI: cadence: Move PCIe EP common functions to a
separate file
On 8/19/2025 5:22 PM, hans.zhang@...tech.com wrote:
> +u8 cdns_pcie_get_fn_from_vfn(struct cdns_pcie *pcie, u8 fn, u8 vfn)
> +{
> + u32 cap = CDNS_PCIE_EP_FUNC_SRIOV_CAP_OFFSET;
> + u32 first_vf_offset, stride;
> +
> + if (vfn == 0)
> + return fn;
> +
> + first_vf_offset = cdns_pcie_ep_fn_readw(pcie, fn, cap + PCI_SRIOV_VF_OFFSET);
> + stride = cdns_pcie_ep_fn_readw(pcie, fn, cap + PCI_SRIOV_VF_STRIDE);
extra space before PCI_SRIOV_VF_STRIDE.
It is from old code, but since this line is touched, better to remove it.
> + fn = fn + first_vf_offset + ((vfn - 1) * stride);
> +
> + return fn;
> +}
Thanks,
Alok
Powered by blists - more mailing lists