]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
octeontx2: hide unused label
authorArnd Bergmann <arnd@arndb.de>
Wed, 19 Feb 2025 16:21:14 +0000 (17:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:14:06 +0000 (11:14 +0200)
commit ca57d1c56f4015d83fe7840b41d74783ee900b28 upstream.

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>
Reviewed-by: Suman Ghosh <sumang@marvell.com>
Link: https://patch.msgid.link/20250219162239.1376865-1-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c

index 50a42cd5d50a2c8e87596b8f116992afd88d6543..09a51970851ff9d22172b0485d4054ace7f0b2b5 100644 (file)
@@ -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:
index 1f53bd5e45604710b4430b7c8c1c72110c8cb2ab..9b28be4c4a5d6c0c4ed01a869fc558e64faa2777 100644 (file)
@@ -740,8 +740,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: