Re: [PATCH v8 05/15] PCI: cadence: Move PCIe EP common functions to a separate file
From: ALOK TIWARI
Date: Tue Aug 19 2025 - 13:47:12 EST
On 8/19/2025 5:22 PM, hans.zhang@xxxxxxxxxxx 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