commit f695390ea639 ("octeontx2-af: Fix limiting SRIOV VF count logic") added a local PCI_DEVID_OCTEONTX2_RVU_AFVF define in rvu.c, duplicating RVU_LBK_VF_DEVID in rvu.h. Move the definition into the "PCI device IDs" block in rvu.h, rename RVU_LBK_VF_DEVID to match the PCI_DEVID_* naming convention of its peers, and drop the local define. No functional change. Signed-off-by: Jiangshan Yi --- drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 -- drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c index 937b085582b5..65e08ad9d82e 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c @@ -3468,8 +3468,6 @@ int rvu_get_num_lbk_chans(void) return ret; } -#define PCI_DEVID_OCTEONTX2_RVU_AFVF 0xA0F8 - static int rvu_enable_sriov(struct rvu *rvu) { struct pci_dev *pdev = rvu->pdev; diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h index 094227404ef9..16846eeb793d 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h @@ -22,6 +22,7 @@ /* PCI device IDs */ #define PCI_DEVID_OCTEONTX2_RVU_AF 0xA065 +#define PCI_DEVID_OCTEONTX2_RVU_AFVF 0xA0F8 #define PCI_DEVID_OCTEONTX2_LBK 0xA061 /* Subsystem Device ID */ @@ -882,11 +883,10 @@ static inline bool is_rvu_supports_nix1(struct rvu *rvu) /* Function Prototypes * RVU */ -#define RVU_LBK_VF_DEVID 0xA0F8 static inline bool is_lbk_vf(struct rvu *rvu, u16 pcifunc) { return (!(pcifunc & ~RVU_PFVF_FUNC_MASK) && - (rvu->vf_devid == RVU_LBK_VF_DEVID)); + (rvu->vf_devid == PCI_DEVID_OCTEONTX2_RVU_AFVF)); } static inline bool is_vf(u16 pcifunc) -- 2.25.1