octeontx2: hide unused label
PATCH v2 1/1 octeontx2: hide unused label
From: Arnd Bergmann <[email protected]>
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.
---
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(+)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +2 -0
@@ -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:
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +2 -0
@@ -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:
Signature · 1 line
2.39.5
Quoted 33 lines
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(+)drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +1
-0@@ -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:drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +1
-0@@ -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:
Quoted 7 lines
bitmap_free(vf->af_xdp_zc_qidx); +#endif err_unreg_devlink: otx2_unregister_dl(vf);
err_shutdown_tc:
--
2.39.5
[Suman] Thanks for the patch, looks good to me.
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Wed, 19 Feb 2025 17:21:14 +0100 you wrote:
From: Arnd Bergmann <[email protected]>
A previous patch introduces a build-time warning when
CONFIG_DCBis 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][...]
Here is the summary with links:
- [net-next,v2] octeontx2: hide unused label
https://git.kernel.org/netdev/net-next/c/ca57d1c56f40
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html