[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250219162239.1376865-1-arnd@kernel.org>
Date: Wed, 19 Feb 2025 17:21:14 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Sunil Goutham <sgoutham@...vell.com>,
Geetha sowjanya <gakula@...vell.com>,
Subbaraya Sundeep <sbhatta@...vell.com>,
hariprasad <hkelam@...vell.com>,
Bharat Bhushan <bbhushan2@...vell.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Suman Ghosh <sumang@...vell.com>,
Sai Krishna <saikrishnag@...vell.com>,
Nithin Dabilpuram <ndabilpuram@...vell.com>,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] [net-next v2] octeontx2: hide unused label
From: Arnd Bergmann <arnd@...db.de>
A previous patch introduces a build-time warning when CONFIG_DCB
is disabled:
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c: In function 'otx2_probe':
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:3217:1: error: label 'err_free_zc_bmap' defined but not used [-Werror=unused-label]
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c: In function 'otx2vf_probe':
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c:740:1: error: label 'err_free_zc_bmap' defined but not used [-Werror=unused-label]
Add the same #ifdef check around it.
Fixes: efabce290151 ("octeontx2-pf: AF_XDP zero copy receive support")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
v2: fix typo s/CONfiG_DCB/CONFIG_DCB/
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 ++
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index c7c562f0f5e5..cfed9ec5b157 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -3214,8 +3214,10 @@ static int otx2_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return 0;
+#ifdef CONFIG_DCB
err_free_zc_bmap:
bitmap_free(pf->af_xdp_zc_qidx);
+#endif
err_sriov_cleannup:
otx2_sriov_vfcfg_cleanup(pf);
err_pf_sriov_init:
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
index 63ddd262d122..7ef3ba477d49 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c
@@ -737,8 +737,10 @@ static int otx2vf_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return 0;
+#ifdef CONFIG_DCB
err_free_zc_bmap:
bitmap_free(vf->af_xdp_zc_qidx);
+#endif
err_unreg_devlink:
otx2_unregister_dl(vf);
err_shutdown_tc:
--
2.39.5
Powered by blists - more mailing lists