diff mbox series

[net-next,v2] octeontx2: hide unused label

Message ID 20250219162239.1376865-1-arnd@kernel.org (mailing list archive)
State Accepted
Commit ca57d1c56f4015d83fe7840b41d74783ee900b28
Delegated to: Netdev Maintainers
Headers show
Series [net-next,v2] octeontx2: hide unused label | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 4 this patch: 4
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 20 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2025-02-20--12-00 (tests: 893)

Commit Message

Arnd Bergmann Feb. 19, 2025, 4:21 p.m. UTC
From: Arnd Bergmann <arnd@arndb.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@arndb.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(+)

Comments

Suman Ghosh Feb. 19, 2025, 6 p.m. UTC | #1
> 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
[Suman] Thanks for the patch, looks good to me.
Reviewed-by: Suman Ghosh <sumang@marvell.com>
patchwork-bot+netdevbpf@kernel.org Feb. 21, 2025, 2:17 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 19 Feb 2025 17:21:14 +0100 you wrote:
> From: Arnd Bergmann <arnd@arndb.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]
> 
> [...]

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!
diff mbox series

Patch

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: