DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Nipun Gupta <nipun.gupta@amd.com>,
	Nikhil Agarwal <nikhil.agarwal@amd.com>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@nxp.com>,
	Rosen Xu <rosen.xu@altera.com>,
	Tomasz Duszynski <tduszynski@marvell.com>,
	Chengwen Feng <fengchengwen@huawei.com>
Subject: [PATCH 11/45] bus: do not export unused driver unregister functions
Date: Sun, 29 Nov 2026 12:48:56 -0800	[thread overview]
Message-ID: <20261129205006.1440292-12-stephen@networkplumber.org> (raw)
In-Reply-To: <20261129205006.1440292-1-stephen@networkplumber.org>

None of the bus driver unregister functions are called. Drivers
register themselves through the RTE_PMD_REGISTER_* macros at load
time and are never unregistered, and rte_bus_unregister() has no
caller either.

Drop the internal exports. The functions themselves are kept as the
counterparts of the register functions.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/bus/cdx/bus_cdx_driver.h           | 1 -
 drivers/bus/cdx/cdx.c                      | 1 -
 drivers/bus/dpaa/bus_dpaa_driver.h         | 1 -
 drivers/bus/dpaa/dpaa_bus.c                | 1 -
 drivers/bus/fslmc/bus_fslmc_driver.h       | 1 -
 drivers/bus/fslmc/fslmc_bus.c              | 1 -
 drivers/bus/ifpga/bus_ifpga_driver.h       | 1 -
 drivers/bus/ifpga/ifpga_bus.c              | 1 -
 drivers/bus/platform/bus_platform_driver.h | 1 -
 drivers/bus/platform/platform.c            | 1 -
 drivers/bus/uacce/bus_uacce_driver.h       | 1 -
 drivers/bus/uacce/uacce.c                  | 1 -
 drivers/bus/vdev/bus_vdev_driver.h         | 1 -
 drivers/bus/vdev/vdev.c                    | 1 -
 lib/eal/common/eal_common_bus.c            | 1 -
 lib/eal/include/bus_driver.h               | 1 -
 16 files changed, 16 deletions(-)

diff --git a/drivers/bus/cdx/bus_cdx_driver.h b/drivers/bus/cdx/bus_cdx_driver.h
index 01684466ed..5c6aa528f4 100644
--- a/drivers/bus/cdx/bus_cdx_driver.h
+++ b/drivers/bus/cdx/bus_cdx_driver.h
@@ -192,7 +192,6 @@ int rte_cdx_vfio_bm_disable(struct rte_cdx_device *dev);
  *   A pointer to a rte_cdx_driver structure describing the driver
  *   to be unregistered.
  */
-__rte_internal
 void rte_cdx_unregister(struct rte_cdx_driver *driver);
 
 #ifdef __cplusplus
diff --git a/drivers/bus/cdx/cdx.c b/drivers/bus/cdx/cdx.c
index ee8f24e67e..779f912b38 100644
--- a/drivers/bus/cdx/cdx.c
+++ b/drivers/bus/cdx/cdx.c
@@ -367,7 +367,6 @@ rte_cdx_register(struct rte_cdx_driver *driver)
 }
 
 /* unregister a driver */
-RTE_EXPORT_INTERNAL_SYMBOL(rte_cdx_unregister)
 void
 rte_cdx_unregister(struct rte_cdx_driver *driver)
 {
diff --git a/drivers/bus/dpaa/bus_dpaa_driver.h b/drivers/bus/dpaa/bus_dpaa_driver.h
index 4aed83f84d..02b75b54ff 100644
--- a/drivers/bus/dpaa/bus_dpaa_driver.h
+++ b/drivers/bus/dpaa/bus_dpaa_driver.h
@@ -195,7 +195,6 @@ void rte_dpaa_driver_register(struct rte_dpaa_driver *driver);
  *	A pointer to a rte_dpaa_driver structure describing the driver
  *	to be unregistered.
  */
-__rte_internal
 void rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver);
 
 /**
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index cbbeb927fe..5146a40f2e 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -558,7 +558,6 @@ rte_dpaa_driver_register(struct rte_dpaa_driver *driver)
 }
 
 /* un-register a dpaa bus based dpaa driver */
-RTE_EXPORT_INTERNAL_SYMBOL(rte_dpaa_driver_unregister)
 void
 rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver)
 {
diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
index ead9d6613c..80782a4a88 100644
--- a/drivers/bus/fslmc/bus_fslmc_driver.h
+++ b/drivers/bus/fslmc/bus_fslmc_driver.h
@@ -184,7 +184,6 @@ void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
  *   A pointer to a rte_dpaa2_driver structure describing the driver
  *   to be unregistered.
  */
-__rte_internal
 void rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver);
 
 /** Helper for DPAA2 device registration from driver (eth, crypto) instance */
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index e40fe59c7c..da7b7f3a67 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -662,7 +662,6 @@ rte_fslmc_driver_register(struct rte_dpaa2_driver *driver)
 }
 
 /*un-register a fslmc bus based dpaa2 driver */
-RTE_EXPORT_INTERNAL_SYMBOL(rte_fslmc_driver_unregister)
 void
 rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver)
 {
diff --git a/drivers/bus/ifpga/bus_ifpga_driver.h b/drivers/bus/ifpga/bus_ifpga_driver.h
index 66ef5daf0f..b90a9f42a4 100644
--- a/drivers/bus/ifpga/bus_ifpga_driver.h
+++ b/drivers/bus/ifpga/bus_ifpga_driver.h
@@ -115,7 +115,6 @@ void rte_ifpga_driver_register(struct rte_afu_driver *driver);
  *   A pointer to a rte_afu_driver structure describing the driver
  *   to be unregistered.
  */
-__rte_internal
 void rte_ifpga_driver_unregister(struct rte_afu_driver *driver);
 
 #define RTE_PMD_REGISTER_AFU(nm, afudrv)\
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index 79d1c3778f..8f08f82340 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -48,7 +48,6 @@ void rte_ifpga_driver_register(struct rte_afu_driver *driver)
 }
 
 /* un-register a fpga bus based driver */
-RTE_EXPORT_INTERNAL_SYMBOL(rte_ifpga_driver_unregister)
 void rte_ifpga_driver_unregister(struct rte_afu_driver *driver)
 {
 	rte_bus_remove_driver(&rte_ifpga_bus, &driver->driver);
diff --git a/drivers/bus/platform/bus_platform_driver.h b/drivers/bus/platform/bus_platform_driver.h
index 1a55c729db..5fc23bb256 100644
--- a/drivers/bus/platform/bus_platform_driver.h
+++ b/drivers/bus/platform/bus_platform_driver.h
@@ -145,7 +145,6 @@ void rte_platform_register(struct rte_platform_driver *pdrv);
  * @param pdrv
  *   A pointer to a rte_platform_driver structure describing driver to be unregistered.
  */
-__rte_internal
 void rte_platform_unregister(struct rte_platform_driver *pdrv);
 
 #ifdef __cplusplus
diff --git a/drivers/bus/platform/platform.c b/drivers/bus/platform/platform.c
index b122d9545f..c65a04287a 100644
--- a/drivers/bus/platform/platform.c
+++ b/drivers/bus/platform/platform.c
@@ -39,7 +39,6 @@ rte_platform_register(struct rte_platform_driver *pdrv)
 	rte_bus_add_driver(&platform_bus, &pdrv->driver);
 }
 
-RTE_EXPORT_INTERNAL_SYMBOL(rte_platform_unregister)
 void
 rte_platform_unregister(struct rte_platform_driver *pdrv)
 {
diff --git a/drivers/bus/uacce/bus_uacce_driver.h b/drivers/bus/uacce/bus_uacce_driver.h
index 4b84d9ead8..c72f6762b3 100644
--- a/drivers/bus/uacce/bus_uacce_driver.h
+++ b/drivers/bus/uacce/bus_uacce_driver.h
@@ -232,7 +232,6 @@ void rte_uacce_register(struct rte_uacce_driver *driver);
  *   A pointer to a rte_uacce_driver structure describing the driver to be
  *   unregistered.
  */
-__rte_internal
 void rte_uacce_unregister(struct rte_uacce_driver *driver);
 
 /**
diff --git a/drivers/bus/uacce/uacce.c b/drivers/bus/uacce/uacce.c
index 99a6fb314d..5d027f4bc4 100644
--- a/drivers/bus/uacce/uacce.c
+++ b/drivers/bus/uacce/uacce.c
@@ -522,7 +522,6 @@ rte_uacce_register(struct rte_uacce_driver *driver)
 	rte_bus_add_driver(&uacce_bus, &driver->driver);
 }
 
-RTE_EXPORT_INTERNAL_SYMBOL(rte_uacce_unregister)
 void
 rte_uacce_unregister(struct rte_uacce_driver *driver)
 {
diff --git a/drivers/bus/vdev/bus_vdev_driver.h b/drivers/bus/vdev/bus_vdev_driver.h
index d3e60d4902..8f902884da 100644
--- a/drivers/bus/vdev/bus_vdev_driver.h
+++ b/drivers/bus/vdev/bus_vdev_driver.h
@@ -115,7 +115,6 @@ void rte_vdev_register(struct rte_vdev_driver *driver);
  *   A pointer to a rte_vdev_driver structure describing the driver
  *   to be unregistered.
  */
-__rte_internal
 void rte_vdev_unregister(struct rte_vdev_driver *driver);
 
 #define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 02d719a44d..a201d74c91 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -60,7 +60,6 @@ rte_vdev_register(struct rte_vdev_driver *driver)
 }
 
 /* unregister a driver */
-RTE_EXPORT_INTERNAL_SYMBOL(rte_vdev_unregister)
 void
 rte_vdev_unregister(struct rte_vdev_driver *driver)
 {
diff --git a/lib/eal/common/eal_common_bus.c b/lib/eal/common/eal_common_bus.c
index 067e7a8b67..b7cbca2ea6 100644
--- a/lib/eal/common/eal_common_bus.c
+++ b/lib/eal/common/eal_common_bus.c
@@ -46,7 +46,6 @@ rte_bus_register(struct rte_bus *bus)
 	EAL_LOG(DEBUG, "Registered [%s] bus.", rte_bus_name(bus));
 }
 
-RTE_EXPORT_INTERNAL_SYMBOL(rte_bus_unregister)
 void
 rte_bus_unregister(struct rte_bus *bus)
 {
diff --git a/lib/eal/include/bus_driver.h b/lib/eal/include/bus_driver.h
index fa4d711a90..0677bc5879 100644
--- a/lib/eal/include/bus_driver.h
+++ b/lib/eal/include/bus_driver.h
@@ -452,7 +452,6 @@ RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
  *   A pointer to a rte_bus structure describing the bus
  *   to be unregistered.
  */
-__rte_internal
 void rte_bus_unregister(struct rte_bus *bus);
 
 /**
-- 
2.53.0


  parent reply	other threads:[~2026-11-29 20:51 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
2026-11-29 20:48 ` [PATCH 01/45] bus/vmbus: do not export unused internal symbol Stephen Hemminger
2026-11-29 20:48 ` [PATCH 02/45] bus/dpaa: remove exports for nonexistent symbols Stephen Hemminger
2026-11-29 20:48 ` [PATCH 03/45] ethdev: do not export internal dummy ops Stephen Hemminger
2026-11-29 20:48 ` [PATCH 04/45] hash: do not export internal toeplitz helper Stephen Hemminger
2026-11-29 20:48 ` [PATCH 05/45] cryptodev: do not export internal device name helper Stephen Hemminger
2026-11-29 20:48 ` [PATCH 06/45] mldev: do not export internal PMD device helpers Stephen Hemminger
2026-11-29 20:48 ` [PATCH 07/45] gpudev: do not export unused internal functions Stephen Hemminger
2026-11-29 20:48 ` [PATCH 08/45] eal/linux: do not export internal VFIO helpers Stephen Hemminger
2026-11-29 20:48 ` [PATCH 09/45] eal/linux: remove unused VFIO device number helper Stephen Hemminger
2026-11-29 20:48 ` [PATCH 10/45] eal: make per-thread epoll instance getter static Stephen Hemminger
2026-11-29 20:48 ` Stephen Hemminger [this message]
2026-11-29 20:48 ` [PATCH 12/45] bus/fslmc: do not export internal symbols used only in the bus Stephen Hemminger
2026-11-29 20:48 ` [PATCH 13/45] bus/dpaa: " Stephen Hemminger
2026-11-29 20:48 ` [PATCH 14/45] common/dpaax: do not export IOVA table dump helper Stephen Hemminger
2026-11-29 20:49 ` [PATCH 15/45] net/nfb: do not export MDIO speed capability helper Stephen Hemminger
2026-11-30  9:56   ` Martin Spinler
2026-11-29 20:49 ` [PATCH 16/45] common/sxe2: do not export internal ioctl channel helpers Stephen Hemminger
2026-11-29 20:49 ` [PATCH 17/45] common/mlx5: do not export internal symbols used only in common code Stephen Hemminger
2026-11-30 10:50   ` Dariusz Sosnowski
2026-11-29 20:49 ` [PATCH 18/45] net/idpf: do not export internal symbols used only in the driver Stephen Hemminger
2026-11-29 20:49 ` [PATCH 19/45] net/iavf: do not export VF reset function Stephen Hemminger
2026-11-29 20:49 ` [PATCH 20/45] eal: do not export unused Windows interrupt handle accessors Stephen Hemminger
2026-11-29 20:49 ` [PATCH 21/45] common/cnxk: do not export internal symbols used only in roc Stephen Hemminger
2026-11-29 20:49 ` [PATCH 22/45] common/sfc_efx: do not export internal symbols unused outside base Stephen Hemminger
2026-11-29 20:49 ` [PATCH 23/45] crypto/cnxk: do not export internal Rx inject helpers Stephen Hemminger
2026-11-29 20:49 ` [PATCH 24/45] net/cnxk: do not export inline inbound mode setter Stephen Hemminger
2026-11-29 20:49 ` [PATCH 25/45] common/sfc_efx: remove unused libefx functions Stephen Hemminger
2026-11-29 20:49 ` [PATCH 26/45] common/cnxk: remove unused roc functions Stephen Hemminger
2026-11-29 20:49 ` [PATCH 27/45] common/mlx5: remove unused internal functions Stephen Hemminger
2026-11-30 10:51   ` Dariusz Sosnowski
2026-11-29 20:49 ` [PATCH 28/45] bus/fslmc: remove unused VFIO helpers Stephen Hemminger
2026-11-29 20:49 ` [PATCH 29/45] bus/dpaa: remove unused FMan and netcfg helpers Stephen Hemminger
2026-11-29 20:49 ` [PATCH 30/45] common/dpaax: remove unused IOVA table dump Stephen Hemminger
2026-11-29 20:49 ` [PATCH 31/45] net/idpf: remove unused queue enable helper Stephen Hemminger
2026-11-29 20:49 ` [PATCH 32/45] gpudev: remove unused attach function Stephen Hemminger
2026-11-29 20:49 ` [PATCH 33/45] cryptodev: remove unused device name helper Stephen Hemminger
2026-11-29 20:49 ` [PATCH 34/45] common/cnxk: remove unused MCS port recovery Stephen Hemminger
2026-11-29 20:49 ` [PATCH 35/45] bus/dpaa: remove unused QMan and BMan functions Stephen Hemminger
2026-11-29 20:49 ` [PATCH 36/45] bus/fslmc: remove unused MC object functions Stephen Hemminger
2026-11-29 20:49 ` [PATCH 37/45] eal: remove unused Windows interrupt handle accessors Stephen Hemminger
2026-11-29 20:49 ` [PATCH 38/45] common/sfc_efx: make efx_family static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 39/45] gpudev: make event notify helper static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 40/45] mldev: make device lookup " Stephen Hemminger
2026-11-29 20:49 ` [PATCH 41/45] bus/fslmc: make internal helpers static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 42/45] net/cnxk: make inline inbound mode setter static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 43/45] common/sxe2: make memory event callback static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 44/45] net/idpf: make internal burst functions static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 45/45] common/cnxk: make internal roc " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 01/38] net/mlx4: fix unreachable code warnings Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 02/38] net/mlx5: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 03/38] examples/ipsec-secgw: remove dead code Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 04/38] eventdev: fix vector adapter instance allocation Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 05/38] test/eal: skip filesystem test on FreeBSD Stephen Hemminger
2026-12-01  8:58     ` Bruce Richardson
2026-11-30 21:49   ` [PATCH v2 06/38] eal: silence unreachable code in version string Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 07/38] net/dpaa2: remove debug abort in flow destroy Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 08/38] app/testpmd: fix unreachable VF traffic error message Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 09/38] examples/eventdev_pipeline: remove dead continue Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 10/38] examples/skeleton: handle SIGINT and SIGTERM Stephen Hemminger
2026-12-01  8:59     ` Bruce Richardson
2026-11-30 21:49   ` [PATCH v2 11/38] examples/rxtx_callbacks: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 12/38] examples/service_cores: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 13/38] examples/timer: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 14/38] examples/multi_process: handle SIGINT and SIGTERM in client Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 15/38] examples/server_node_efd: handle SIGINT and SIGTERM in node Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 16/38] examples/pipeline: handle SIGINT and SIGTERM Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 17/38] ethdev: fix unreachable warnings from switch declarations Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 18/38] config: add per-directory option for -Wunreachable-code Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 19/38] bus/dpaa: exempt this driver from unreachable code detection Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 20/38] net/qede: disable unreachable code checks Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 21/38] net/txgbe: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 22/38] net/ixgbe: disable unreachable code check Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 23/38] net/ngbe: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 24/38] net/octeontx: replace unreachable code Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 25/38] common/sfc_efx: disable unreachable code check for base code Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 26/38] net/dpaa2: check port state before changing TM hierarchy Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 27/38] net/e1000: disable unreachable code check for base code Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 28/38] net/ice: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 29/38] raw/ifpga: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 30/38] net/bnxt: disable unreachable code check Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 31/38] net/ntnic: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 32/38] lib: mark never returning thread functions Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 33/38] lib: remove unreachable statements Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 34/38] app: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 35/38] examples: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 36/38] drivers: " Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 37/38] efd: mark configuration dependent vector selection Stephen Hemminger
2026-11-30 21:49   ` [PATCH v2 38/38] config: enable unreachable code detection Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261129205006.1440292-12-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=nikhil.agarwal@amd.com \
    --cc=nipun.gupta@amd.com \
    --cc=rosen.xu@altera.com \
    --cc=sachin.saxena@nxp.com \
    --cc=tduszynski@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox