From f8e9989606e7a9548a25ac10e2daae4c8af230cb Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Mon, 18 Jun 2018 14:32:21 +0200 Subject: [PATCH] remove useless constructor headers A constructor is usually declared with RTE_INIT* macros. As it is a static function, no need to declare before its definition. The macro is used directly in the function definition. Signed-off-by: Thomas Monjalon --- app/test-eventdev/evt_test.h | 3 +-- drivers/baseband/null/bbdev_null.c | 4 +--- drivers/baseband/turbo_sw/bbdev_turbo_software.c | 4 +--- drivers/bus/dpaa/dpaa_bus.c | 4 +--- drivers/bus/dpaa/rte_dpaa_bus.h | 3 +-- drivers/bus/fslmc/fslmc_bus.c | 4 +--- drivers/bus/fslmc/rte_fslmc.h | 6 ++---- drivers/bus/ifpga/rte_bus_ifpga.h | 3 +-- drivers/bus/pci/rte_bus_pci.h | 3 +-- drivers/bus/vdev/rte_bus_vdev.h | 3 +-- drivers/common/octeontx/octeontx_mbox.c | 4 +--- drivers/common/qat/qat_logs.c | 4 +--- drivers/compress/isal/isal_compress_pmd.c | 5 +---- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 5 +---- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 +--- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 4 +--- drivers/crypto/dpaa_sec/dpaa_sec.c | 4 +--- drivers/crypto/kasumi/rte_kasumi_pmd.c | 4 +--- drivers/crypto/null/null_crypto_pmd.c | 4 +--- drivers/crypto/openssl/rte_openssl_pmd.c | 4 +--- drivers/crypto/scheduler/rte_cryptodev_scheduler.c | 5 +---- drivers/crypto/snow3g/rte_snow3g_pmd.c | 4 +--- drivers/crypto/virtio/virtio_cryptodev.c | 4 +--- drivers/crypto/zuc/rte_zuc_pmd.c | 4 +--- drivers/event/dpaa2/dpaa2_eventdev.c | 4 +--- drivers/event/octeontx/ssovf_evdev.c | 4 +--- drivers/event/octeontx/timvf_evdev.c | 4 +--- drivers/event/opdl/opdl_evdev.c | 5 +---- drivers/event/sw/sw_evdev.c | 4 +--- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 4 +--- drivers/mempool/octeontx/octeontx_fpavf.c | 4 +--- drivers/net/af_packet/rte_eth_af_packet.c | 4 +--- drivers/net/avf/avf_ethdev.c | 4 +--- drivers/net/avp/avp_ethdev.c | 4 +--- drivers/net/axgbe/axgbe_ethdev.c | 4 +--- drivers/net/bnx2x/bnx2x_ethdev.c | 4 +--- drivers/net/bnxt/bnxt_ethdev.c | 4 +--- drivers/net/bonding/rte_eth_bond_pmd.c | 4 +--- drivers/net/dpaa2/dpaa2_ethdev.c | 4 +--- drivers/net/e1000/em_ethdev.c | 4 +--- drivers/net/e1000/igb_ethdev.c | 4 +--- drivers/net/ena/ena_ethdev.c | 4 +--- drivers/net/enic/enic_ethdev.c | 4 +--- drivers/net/failsafe/failsafe.c | 4 +--- drivers/net/fm10k/fm10k_ethdev.c | 4 +--- drivers/net/i40e/i40e_ethdev.c | 4 +--- drivers/net/ifc/ifcvf_vdpa.c | 4 +--- drivers/net/ixgbe/ixgbe_ethdev.c | 4 +--- drivers/net/kni/rte_eth_kni.c | 4 +--- drivers/net/liquidio/lio_ethdev.c | 4 +--- drivers/net/mlx4/mlx4.c | 4 +--- drivers/net/mlx5/mlx5.c | 4 +--- drivers/net/mvpp2/mrvl_ethdev.c | 4 +--- drivers/net/nfp/nfp_net.c | 4 +--- drivers/net/null/rte_eth_null.c | 4 +--- drivers/net/octeontx/octeontx_ethdev.c | 4 +--- drivers/net/pcap/rte_eth_pcap.c | 4 +--- drivers/net/qede/qede_ethdev.c | 4 +--- drivers/net/ring/rte_eth_ring.c | 4 +--- drivers/net/sfc/sfc_ethdev.c | 4 +--- drivers/net/softnic/rte_eth_softnic.c | 4 +--- drivers/net/szedata2/rte_eth_szedata2.c | 4 +--- drivers/net/tap/rte_eth_tap.c | 4 +--- drivers/net/thunderx/nicvf_ethdev.c | 4 +--- drivers/net/vhost/rte_eth_vhost.c | 4 +--- drivers/net/virtio/virtio_ethdev.c | 8 ++------ drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 +--- drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 5 +---- drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 4 +--- drivers/raw/ifpga_rawdev/ifpga_rawdev.c | 4 +--- drivers/raw/skeleton_rawdev/skeleton_rawdev.c | 5 +---- lib/librte_bbdev/rte_bbdev.c | 4 +--- lib/librte_bpf/bpf.c | 5 +---- lib/librte_compressdev/rte_compressdev.c | 5 +---- lib/librte_cryptodev/rte_cryptodev_pmd.h | 3 +-- lib/librte_eal/common/eal_common_log.c | 4 +--- lib/librte_eal/common/include/rte_bus.h | 3 +-- lib/librte_eal/common/include/rte_tailq.h | 3 +-- lib/librte_ethdev/rte_ethdev.c | 4 +--- lib/librte_eventdev/rte_event_timer_adapter.c | 4 +--- lib/librte_flow_classify/rte_flow_classify.c | 5 +---- lib/librte_member/rte_member.c | 5 +---- lib/librte_rawdev/rte_rawdev.c | 5 +---- 83 files changed, 85 insertions(+), 256 deletions(-) diff --git a/app/test-eventdev/evt_test.h b/app/test-eventdev/evt_test.h index 7477a325f9..f07d2c3336 100644 --- a/app/test-eventdev/evt_test.h +++ b/app/test-eventdev/evt_test.h @@ -77,8 +77,7 @@ void evt_test_dump_names(void); #define EVT_TEST_REGISTER(nm) \ static struct evt_test_entry _evt_test_entry_ ##nm; \ -RTE_INIT(evt_test_ ##nm); \ -static void evt_test_ ##nm(void) \ +RTE_INIT(evt_test_ ##nm) \ { \ _evt_test_entry_ ##nm.test.name = RTE_STR(nm);\ memcpy(&_evt_test_entry_ ##nm.test.ops, &nm, \ diff --git a/drivers/baseband/null/bbdev_null.c b/drivers/baseband/null/bbdev_null.c index 76fc9d7ace..2f25151015 100644 --- a/drivers/baseband/null/bbdev_null.c +++ b/drivers/baseband/null/bbdev_null.c @@ -348,9 +348,7 @@ RTE_PMD_REGISTER_PARAM_STRING(DRIVER_NAME, BBDEV_NULL_SOCKET_ID_ARG"="); RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, bbdev_null); -RTE_INIT(null_bbdev_init_log); -static void -null_bbdev_init_log(void) +RTE_INIT(null_bbdev_init_log) { bbdev_null_logtype = rte_log_register("pmd.bb.null"); if (bbdev_null_logtype >= 0) diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c index 05e95ed90b..1a2430ec81 100644 --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c @@ -1299,9 +1299,7 @@ RTE_PMD_REGISTER_PARAM_STRING(DRIVER_NAME, TURBO_SW_SOCKET_ID_ARG"="); RTE_PMD_REGISTER_ALIAS(DRIVER_NAME, turbo_sw); -RTE_INIT(null_bbdev_init_log); -static void -null_bbdev_init_log(void) +RTE_INIT(turbo_sw_bbdev_init_log) { bbdev_turbo_sw_logtype = rte_log_register("pmd.bb.turbo_sw"); if (bbdev_turbo_sw_logtype >= 0) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 20462065c4..af9e91e4b8 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -626,9 +626,7 @@ struct rte_dpaa_bus rte_dpaa_bus = { RTE_REGISTER_BUS(FSL_DPAA_BUS_NAME, rte_dpaa_bus.bus); -RTE_INIT(dpaa_init_log); -static void -dpaa_init_log(void) +RTE_INIT(dpaa_init_log) { dpaa_logtype_bus = rte_log_register("bus.dpaa"); if (dpaa_logtype_bus >= 0) diff --git a/drivers/bus/dpaa/rte_dpaa_bus.h b/drivers/bus/dpaa/rte_dpaa_bus.h index 8573bd6edd..15dc6a4ac0 100644 --- a/drivers/bus/dpaa/rte_dpaa_bus.h +++ b/drivers/bus/dpaa/rte_dpaa_bus.h @@ -164,8 +164,7 @@ void dpaa_portal_finish(void *arg); /** Helper for DPAA device registration from driver (eth, crypto) instance */ #define RTE_PMD_REGISTER_DPAA(nm, dpaa_drv) \ -RTE_INIT(dpaainitfn_ ##nm); \ -static void dpaainitfn_ ##nm(void) \ +RTE_INIT(dpaainitfn_ ##nm) \ {\ (dpaa_drv).driver.name = RTE_STR(nm);\ rte_dpaa_driver_register(&dpaa_drv); \ diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index c6301b20b5..d2900edc51 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -519,9 +519,7 @@ struct rte_fslmc_bus rte_fslmc_bus = { RTE_REGISTER_BUS(FSLMC_BUS_NAME, rte_fslmc_bus.bus); -RTE_INIT(fslmc_init_log); -static void -fslmc_init_log(void) +RTE_INIT(fslmc_init_log) { /* Bus level logs */ dpaa2_logtype_bus = rte_log_register("bus.fslmc"); diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h index 33552b4874..cea5b78f9d 100644 --- a/drivers/bus/fslmc/rte_fslmc.h +++ b/drivers/bus/fslmc/rte_fslmc.h @@ -173,8 +173,7 @@ void rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver); /** Helper for DPAA2 device registration from driver (eth, crypto) instance */ #define RTE_PMD_REGISTER_DPAA2(nm, dpaa2_drv) \ -RTE_INIT(dpaa2initfn_ ##nm); \ -static void dpaa2initfn_ ##nm(void) \ +RTE_INIT(dpaa2initfn_ ##nm) \ {\ (dpaa2_drv).driver.name = RTE_STR(nm);\ rte_fslmc_driver_register(&dpaa2_drv); \ @@ -203,8 +202,7 @@ uint32_t rte_fslmc_get_device_count(enum rte_dpaa2_dev_type device_type); /** Helper for DPAA2 object registration */ #define RTE_PMD_REGISTER_DPAA2_OBJECT(nm, dpaa2_obj) \ -RTE_INIT(dpaa2objinitfn_ ##nm); \ -static void dpaa2objinitfn_ ##nm(void) \ +RTE_INIT(dpaa2objinitfn_ ##nm) \ {\ (dpaa2_obj).name = RTE_STR(nm);\ rte_fslmc_object_register(&dpaa2_obj); \ diff --git a/drivers/bus/ifpga/rte_bus_ifpga.h b/drivers/bus/ifpga/rte_bus_ifpga.h index 981bc352df..51d5ae0d95 100644 --- a/drivers/bus/ifpga/rte_bus_ifpga.h +++ b/drivers/bus/ifpga/rte_bus_ifpga.h @@ -134,9 +134,8 @@ void rte_ifpga_driver_register(struct rte_afu_driver *driver); void rte_ifpga_driver_unregister(struct rte_afu_driver *driver); #define RTE_PMD_REGISTER_AFU(nm, afudrv)\ -RTE_INIT(afudrvinitfn_ ##afudrv);\ static const char *afudrvinit_ ## nm ## _alias;\ -static void afudrvinitfn_ ##afudrv(void)\ +RTE_INIT(afudrvinitfn_ ##afudrv)\ {\ (afudrv).driver.name = RTE_STR(nm);\ (afudrv).driver.alias = afudrvinit_ ## nm ## _alias;\ diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h index 828acc5c72..0d1955ffe0 100644 --- a/drivers/bus/pci/rte_bus_pci.h +++ b/drivers/bus/pci/rte_bus_pci.h @@ -191,8 +191,7 @@ void rte_pci_register(struct rte_pci_driver *driver); /** Helper for PCI device registration from driver (eth, crypto) instance */ #define RTE_PMD_REGISTER_PCI(nm, pci_drv) \ -RTE_INIT(pciinitfn_ ##nm); \ -static void pciinitfn_ ##nm(void) \ +RTE_INIT(pciinitfn_ ##nm) \ {\ (pci_drv).driver.name = RTE_STR(nm);\ rte_pci_register(&pci_drv); \ diff --git a/drivers/bus/vdev/rte_bus_vdev.h b/drivers/bus/vdev/rte_bus_vdev.h index f9b5eb5962..9ae3eaae30 100644 --- a/drivers/bus/vdev/rte_bus_vdev.h +++ b/drivers/bus/vdev/rte_bus_vdev.h @@ -86,9 +86,8 @@ void rte_vdev_register(struct rte_vdev_driver *driver); void rte_vdev_unregister(struct rte_vdev_driver *driver); #define RTE_PMD_REGISTER_VDEV(nm, vdrv)\ -RTE_INIT(vdrvinitfn_ ##vdrv);\ static const char *vdrvinit_ ## nm ## _alias;\ -static void vdrvinitfn_ ##vdrv(void)\ +RTE_INIT(vdrvinitfn_ ##vdrv)\ {\ (vdrv).driver.name = RTE_STR(nm);\ (vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\ diff --git a/drivers/common/octeontx/octeontx_mbox.c b/drivers/common/octeontx/octeontx_mbox.c index 93e6e8579d..880f8a40f0 100644 --- a/drivers/common/octeontx/octeontx_mbox.c +++ b/drivers/common/octeontx/octeontx_mbox.c @@ -61,9 +61,7 @@ struct mbox_ram_hdr { int octeontx_logtype_mbox; -RTE_INIT(otx_init_log); -static void -otx_init_log(void) +RTE_INIT(otx_init_log) { octeontx_logtype_mbox = rte_log_register("pmd.octeontx.mbox"); if (octeontx_logtype_mbox >= 0) diff --git a/drivers/common/qat/qat_logs.c b/drivers/common/qat/qat_logs.c index fa3df85f0f..7a86170961 100644 --- a/drivers/common/qat/qat_logs.c +++ b/drivers/common/qat/qat_logs.c @@ -24,9 +24,7 @@ qat_hexdump_log(uint32_t level, uint32_t logtype, const char *title, return 0; } -RTE_INIT(qat_pci_init_log); -static void -qat_pci_init_log(void) +RTE_INIT(qat_pci_init_log) { /* Non-data-path logging for pci device and all services */ qat_gen_logtype = rte_log_register("pmd.qat_general"); diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c index 0f025a3bf2..d9401b0301 100644 --- a/drivers/compress/isal/isal_compress_pmd.c +++ b/drivers/compress/isal/isal_compress_pmd.c @@ -460,10 +460,7 @@ RTE_PMD_REGISTER_VDEV(COMPDEV_NAME_ISAL_PMD, compdev_isal_pmd_drv); RTE_PMD_REGISTER_PARAM_STRING(COMPDEV_NAME_ISAL_PMD, "socket_id="); -RTE_INIT(isal_init_log); - -static void -isal_init_log(void) +RTE_INIT(isal_init_log) { isal_logtype_driver = rte_log_register("comp_isal"); if (isal_logtype_driver >= 0) diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index 5a77a34f4f..7651a8abfa 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -572,10 +572,7 @@ RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_gcm_crypto_drv, aesni_gcm_pmd_drv.driver, cryptodev_driver_id); -RTE_INIT(aesni_gcm_init_log); -static void -aesni_gcm_init_log(void) +RTE_INIT(aesni_gcm_init_log) { aesni_gcm_logtype_driver = rte_log_register("pmd.crypto.aesni_gcm"); - } diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index 85b37cda53..b99e43b07f 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -950,9 +950,7 @@ RTE_PMD_REGISTER_CRYPTO_DRIVER(aesni_mb_crypto_drv, cryptodev_aesni_mb_pmd_drv.driver, cryptodev_driver_id); -RTE_INIT(aesni_mb_init_log); -static void -aesni_mb_init_log(void) +RTE_INIT(aesni_mb_init_log) { aesni_mb_logtype_driver = rte_log_register("pmd.crypto.aesni_mb"); } diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index d769a9c633..2a3c61c668 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2922,9 +2922,7 @@ RTE_PMD_REGISTER_DPAA2(CRYPTODEV_NAME_DPAA2_SEC_PMD, rte_dpaa2_sec_driver); RTE_PMD_REGISTER_CRYPTO_DRIVER(dpaa2_sec_crypto_drv, rte_dpaa2_sec_driver.driver, cryptodev_driver_id); -RTE_INIT(dpaa2_sec_init_log); -static void -dpaa2_sec_init_log(void) +RTE_INIT(dpaa2_sec_init_log) { /* Bus level logs */ dpaa2_logtype_sec = rte_log_register("pmd.crypto.dpaa2"); diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index c00197e4a0..f8536b9494 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -2398,9 +2398,7 @@ RTE_PMD_REGISTER_DPAA(CRYPTODEV_NAME_DPAA_SEC_PMD, rte_dpaa_sec_driver); RTE_PMD_REGISTER_CRYPTO_DRIVER(dpaa_sec_crypto_drv, rte_dpaa_sec_driver.driver, cryptodev_driver_id); -RTE_INIT(dpaa_sec_init_log); -static void -dpaa_sec_init_log(void) +RTE_INIT(dpaa_sec_init_log) { dpaa_logtype_sec = rte_log_register("pmd.crypto.dpaa"); if (dpaa_logtype_sec >= 0) diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index 5c9d54b1fa..239a1cf441 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -623,9 +623,7 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD, RTE_PMD_REGISTER_CRYPTO_DRIVER(kasumi_crypto_drv, cryptodev_kasumi_pmd_drv.driver, cryptodev_driver_id); -RTE_INIT(kasumi_init_log); -static void -kasumi_init_log(void) +RTE_INIT(kasumi_init_log) { kasumi_logtype_driver = rte_log_register("pmd.crypto.kasumi"); } diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c index fca8e35985..6e29a21a68 100644 --- a/drivers/crypto/null/null_crypto_pmd.c +++ b/drivers/crypto/null/null_crypto_pmd.c @@ -247,9 +247,7 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD, RTE_PMD_REGISTER_CRYPTO_DRIVER(null_crypto_drv, cryptodev_null_pmd_drv.driver, cryptodev_driver_id); -RTE_INIT(null_init_log); -static void -null_init_log(void) +RTE_INIT(null_init_log) { null_logtype_driver = rte_log_register("pmd.crypto.null"); } diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 5228b92294..10a258f3fb 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -1734,9 +1734,7 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_OPENSSL_PMD, RTE_PMD_REGISTER_CRYPTO_DRIVER(openssl_crypto_drv, cryptodev_openssl_pmd_drv.driver, cryptodev_driver_id); -RTE_INIT(openssl_init_log); -static void -openssl_init_log(void) +RTE_INIT(openssl_init_log) { openssl_logtype_driver = rte_log_register("pmd.crypto.openssl"); } diff --git a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c index 4fdb111ea7..6e4919c494 100644 --- a/drivers/crypto/scheduler/rte_cryptodev_scheduler.c +++ b/drivers/crypto/scheduler/rte_cryptodev_scheduler.c @@ -578,10 +578,7 @@ rte_cryptodev_scheduler_option_get(uint8_t scheduler_id, return (*sched_ctx->ops.option_get)(dev, option_type, option); } -RTE_INIT(scheduler_init_log); - -static void -scheduler_init_log(void) +RTE_INIT(scheduler_init_log) { scheduler_logtype_driver = rte_log_register("pmd.crypto.scheduler"); } diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index c8170cd76e..a17536b777 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -619,9 +619,7 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD, RTE_PMD_REGISTER_CRYPTO_DRIVER(snow3g_crypto_drv, cryptodev_snow3g_pmd_drv.driver, cryptodev_driver_id); -RTE_INIT(snow3g_init_log); -static void -snow3g_init_log(void) +RTE_INIT(snow3g_init_log) { snow3g_logtype_driver = rte_log_register("pmd.crypto.snow3g"); } diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c index 5cadfcbfa8..cc7a0b1013 100644 --- a/drivers/crypto/virtio/virtio_cryptodev.c +++ b/drivers/crypto/virtio/virtio_cryptodev.c @@ -1475,9 +1475,7 @@ RTE_PMD_REGISTER_CRYPTO_DRIVER(virtio_crypto_drv, rte_virtio_crypto_driver.driver, cryptodev_virtio_driver_id); -RTE_INIT(virtio_crypto_init_log); -static void -virtio_crypto_init_log(void) +RTE_INIT(virtio_crypto_init_log) { virtio_crypto_logtype_init = rte_log_register("pmd.crypto.virtio.init"); if (virtio_crypto_logtype_init >= 0) diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c index 74cf498567..313f4590bf 100644 --- a/drivers/crypto/zuc/rte_zuc_pmd.c +++ b/drivers/crypto/zuc/rte_zuc_pmd.c @@ -542,9 +542,7 @@ RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD, RTE_PMD_REGISTER_CRYPTO_DRIVER(zuc_crypto_drv, cryptodev_zuc_pmd_drv.driver, cryptodev_driver_id); -RTE_INIT(zuc_init_log); -static void -zuc_init_log(void) +RTE_INIT(zuc_init_log) { zuc_logtype_driver = rte_log_register("pmd.crypto.zuc"); } diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index cd801bfb16..ea1e5cc670 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -822,9 +822,7 @@ static struct rte_vdev_driver vdev_eventdev_dpaa2_pmd = { RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_DPAA2_PMD, vdev_eventdev_dpaa2_pmd); -RTE_INIT(dpaa2_eventdev_init_log); -static void -dpaa2_eventdev_init_log(void) +RTE_INIT(dpaa2_eventdev_init_log) { dpaa2_logtype_event = rte_log_register("pmd.event.dpaa2"); if (dpaa2_logtype_event >= 0) diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index 2df70b52ab..c2213bb3ce 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -23,9 +23,7 @@ int otx_logtype_ssovf; static uint8_t timvf_enable_stats; -RTE_INIT(otx_ssovf_init_log); -static void -otx_ssovf_init_log(void) +RTE_INIT(otx_ssovf_init_log) { otx_logtype_ssovf = rte_log_register("pmd.event.octeontx"); if (otx_logtype_ssovf >= 0) diff --git a/drivers/event/octeontx/timvf_evdev.c b/drivers/event/octeontx/timvf_evdev.c index c4fbd2d868..e91e834e8a 100644 --- a/drivers/event/octeontx/timvf_evdev.c +++ b/drivers/event/octeontx/timvf_evdev.c @@ -6,9 +6,7 @@ int otx_logtype_timvf; -RTE_INIT(otx_timvf_init_log); -static void -otx_timvf_init_log(void) +RTE_INIT(otx_timvf_init_log) { otx_logtype_timvf = rte_log_register("pmd.event.octeontx.timer"); if (otx_logtype_timvf >= 0) diff --git a/drivers/event/opdl/opdl_evdev.c b/drivers/event/opdl/opdl_evdev.c index ef9fb30c3c..a4f0bc8b6c 100644 --- a/drivers/event/opdl/opdl_evdev.c +++ b/drivers/event/opdl/opdl_evdev.c @@ -753,10 +753,7 @@ static struct rte_vdev_driver evdev_opdl_pmd_drv = { .remove = opdl_remove }; -RTE_INIT(opdl_init_log); - -static void -opdl_init_log(void) +RTE_INIT(opdl_init_log) { opdl_logtype_driver = rte_log_register("pmd.event.opdl.driver"); if (opdl_logtype_driver >= 0) diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c index 10f0e1ad48..e122d84637 100644 --- a/drivers/event/sw/sw_evdev.c +++ b/drivers/event/sw/sw_evdev.c @@ -964,9 +964,7 @@ RTE_PMD_REGISTER_PARAM_STRING(event_sw, NUMA_NODE_ARG "= " /* declared extern in header, for access from other .c files */ int eventdev_sw_log_level; -RTE_INIT(evdev_sw_init_log); -static void -evdev_sw_init_log(void) +RTE_INIT(evdev_sw_init_log) { eventdev_sw_log_level = rte_log_register("pmd.event.sw"); if (eventdev_sw_log_level >= 0) diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c index e12a0ec8d5..7d0435f518 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c @@ -442,9 +442,7 @@ struct rte_mempool_ops dpaa2_mpool_ops = { MEMPOOL_REGISTER_OPS(dpaa2_mpool_ops); -RTE_INIT(dpaa2_mempool_init_log); -static void -dpaa2_mempool_init_log(void) +RTE_INIT(dpaa2_mempool_init_log) { dpaa2_logtype_mempool = rte_log_register("mempool.dpaa2"); if (dpaa2_logtype_mempool >= 0) diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c index 7aecaa85d6..818887140b 100644 --- a/drivers/mempool/octeontx/octeontx_fpavf.c +++ b/drivers/mempool/octeontx/octeontx_fpavf.c @@ -108,9 +108,7 @@ static struct octeontx_fpadev fpadev; int octeontx_logtype_fpavf; int octeontx_logtype_fpavf_mbox; -RTE_INIT(otx_pool_init_log); -static void -otx_pool_init_log(void) +RTE_INIT(otx_pool_init_log) { octeontx_logtype_fpavf = rte_log_register("pmd.mempool.octeontx"); if (octeontx_logtype_fpavf >= 0) diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index 8cfb7ada4b..ce1e31aa42 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -1016,9 +1016,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_af_packet, "framecnt= " "qdisc_bypass=<0|1>"); -RTE_INIT(af_packet_init_log); -static void -af_packet_init_log(void) +RTE_INIT(af_packet_init_log) { af_packet_logtype = rte_log_register("pmd.net.packet"); if (af_packet_logtype >= 0) diff --git a/drivers/net/avf/avf_ethdev.c b/drivers/net/avf/avf_ethdev.c index ad83a57e02..0e21f8c454 100644 --- a/drivers/net/avf/avf_ethdev.c +++ b/drivers/net/avf/avf_ethdev.c @@ -1343,9 +1343,7 @@ static struct rte_pci_driver rte_avf_pmd = { RTE_PMD_REGISTER_PCI(net_avf, rte_avf_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_avf, pci_id_avf_map); RTE_PMD_REGISTER_KMOD_DEP(net_avf, "* igb_uio | vfio-pci"); -RTE_INIT(avf_init_log); -static void -avf_init_log(void) +RTE_INIT(avf_init_log) { avf_logtype_init = rte_log_register("pmd.net.avf.init"); if (avf_logtype_init >= 0) diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c index 9cc8fbcdfd..7b4d89d32e 100644 --- a/drivers/net/avp/avp_ethdev.c +++ b/drivers/net/avp/avp_ethdev.c @@ -2271,9 +2271,7 @@ avp_dev_stats_reset(struct rte_eth_dev *eth_dev) RTE_PMD_REGISTER_PCI(net_avp, rte_avp_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_avp, pci_id_avp_map); -RTE_INIT(avp_init_log); -static void -avp_init_log(void) +RTE_INIT(avp_init_log) { avp_logtype_driver = rte_log_register("pmd.net.avp.driver"); if (avp_logtype_driver >= 0) diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c index c9c56c48b8..9ae9f0631c 100644 --- a/drivers/net/axgbe/axgbe_ethdev.c +++ b/drivers/net/axgbe/axgbe_ethdev.c @@ -759,9 +759,7 @@ RTE_PMD_REGISTER_PCI(net_axgbe, rte_axgbe_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_axgbe, pci_id_axgbe_map); RTE_PMD_REGISTER_KMOD_DEP(net_axgbe, "* igb_uio | uio_pci_generic | vfio-pci"); -RTE_INIT(axgbe_init_log); -static void -axgbe_init_log(void) +RTE_INIT(axgbe_init_log) { axgbe_logtype_init = rte_log_register("pmd.net.axgbe.init"); if (axgbe_logtype_init >= 0) diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 6a9cd5810d..3a554b8660 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -683,9 +683,7 @@ RTE_PMD_REGISTER_PCI(net_bnx2xvf, rte_bnx2xvf_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_bnx2xvf, pci_id_bnx2xvf_map); RTE_PMD_REGISTER_KMOD_DEP(net_bnx2xvf, "* igb_uio | vfio-pci"); -RTE_INIT(bnx2x_init_log); -static void -bnx2x_init_log(void) +RTE_INIT(bnx2x_init_log) { bnx2x_logtype_init = rte_log_register("pmd.net.bnx2x.init"); if (bnx2x_logtype_init >= 0) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 936a6d529e..9508d6bcb4 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -3540,9 +3540,7 @@ bool is_bnxt_supported(struct rte_eth_dev *dev) return is_device_supported(dev, &bnxt_rte_pmd); } -RTE_INIT(bnxt_init_log); -static void -bnxt_init_log(void) +RTE_INIT(bnxt_init_log) { bnxt_logtype_driver = rte_log_register("pmd.bnxt.driver"); if (bnxt_logtype_driver >= 0) diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 3f3cddf26a..fc4d4fd976 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -3604,9 +3604,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_bonding, int bond_logtype; -RTE_INIT(bond_init_log); -static void -bond_init_log(void) +RTE_INIT(bond_init_log) { bond_logtype = rte_log_register("pmd.net.bon"); if (bond_logtype >= 0) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 9297725d92..c5047367ae 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -2053,9 +2053,7 @@ static struct rte_dpaa2_driver rte_dpaa2_pmd = { RTE_PMD_REGISTER_DPAA2(net_dpaa2, rte_dpaa2_pmd); -RTE_INIT(dpaa2_pmd_init_log); -static void -dpaa2_pmd_init_log(void) +RTE_INIT(dpaa2_pmd_init_log) { dpaa2_logtype_pmd = rte_log_register("pmd.net.dpaa2"); if (dpaa2_logtype_pmd >= 0) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 7039dc100d..053e855b1a 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -1823,9 +1823,7 @@ RTE_PMD_REGISTER_PCI_TABLE(net_e1000_em, pci_id_em_map); RTE_PMD_REGISTER_KMOD_DEP(net_e1000_em, "* igb_uio | uio_pci_generic | vfio-pci"); /* see e1000_logs.c */ -RTE_INIT(igb_init_log); -static void -igb_init_log(void) +RTE_INIT(igb_init_log) { e1000_igb_init_log(); } diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 87df25b08e..64dfe68360 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -5686,9 +5686,7 @@ RTE_PMD_REGISTER_PCI_TABLE(net_e1000_igb_vf, pci_id_igbvf_map); RTE_PMD_REGISTER_KMOD_DEP(net_e1000_igb_vf, "* igb_uio | vfio-pci"); /* see e1000_logs.c */ -RTE_INIT(e1000_init_log); -static void -e1000_init_log(void) +RTE_INIT(e1000_init_log) { e1000_igb_init_log(); } diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 89080a9f59..c255dc6dbd 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -2220,9 +2220,7 @@ RTE_PMD_REGISTER_PCI(net_ena, rte_ena_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map); RTE_PMD_REGISTER_KMOD_DEP(net_ena, "* igb_uio | uio_pci_generic | vfio-pci"); -RTE_INIT(ena_init_log); -static void -ena_init_log(void) +RTE_INIT(ena_init_log) { ena_logtype_init = rte_log_register("pmd.net.ena.init"); if (ena_logtype_init >= 0) diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index 28bd0ff94f..b3d57771f9 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -39,9 +39,7 @@ static const struct rte_pci_id pci_id_enic_map[] = { #define ENIC_DEVARG_DISABLE_OVERLAY "disable-overlay" #define ENIC_DEVARG_IG_VLAN_REWRITE "ig-vlan-rewrite" -RTE_INIT(enicpmd_init_log); -static void -enicpmd_init_log(void) +RTE_INIT(enicpmd_init_log) { enicpmd_logtype_init = rte_log_register("pmd.net.enic.init"); if (enicpmd_logtype_init >= 0) diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index eafbb75dfb..7f89486d4e 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -353,9 +353,7 @@ static struct rte_vdev_driver failsafe_drv = { RTE_PMD_REGISTER_VDEV(net_failsafe, failsafe_drv); RTE_PMD_REGISTER_PARAM_STRING(net_failsafe, PMD_FAILSAFE_PARAM_STRING); -RTE_INIT(failsafe_init_log); -static void -failsafe_init_log(void) +RTE_INIT(failsafe_init_log) { failsafe_logtype = rte_log_register("pmd.net.failsafe"); if (failsafe_logtype >= 0) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index af9b503c31..7c505451a1 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -3294,9 +3294,7 @@ RTE_PMD_REGISTER_PCI(net_fm10k, rte_pmd_fm10k); RTE_PMD_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map); RTE_PMD_REGISTER_KMOD_DEP(net_fm10k, "* igb_uio | uio_pci_generic | vfio-pci"); -RTE_INIT(fm10k_init_log); -static void -fm10k_init_log(void) +RTE_INIT(fm10k_init_log) { fm10k_logtype_init = rte_log_register("pmd.net.fm10k.init"); if (fm10k_logtype_init >= 0) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index bd0c035466..489457a1dc 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -12473,9 +12473,7 @@ i40e_config_rss_filter(struct i40e_pf *pf, return 0; } -RTE_INIT(i40e_init_log); -static void -i40e_init_log(void) +RTE_INIT(i40e_init_log) { i40e_logtype_init = rte_log_register("pmd.net.i40e.init"); if (i40e_logtype_init >= 0) diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c index b8e22daf32..88d8140377 100644 --- a/drivers/net/ifc/ifcvf_vdpa.c +++ b/drivers/net/ifc/ifcvf_vdpa.c @@ -785,9 +785,7 @@ RTE_PMD_REGISTER_PCI(net_ifcvf, rte_ifcvf_vdpa); RTE_PMD_REGISTER_PCI_TABLE(net_ifcvf, pci_id_ifcvf_map); RTE_PMD_REGISTER_KMOD_DEP(net_ifcvf, "* vfio-pci"); -RTE_INIT(ifcvf_vdpa_init_log); -static void -ifcvf_vdpa_init_log(void) +RTE_INIT(ifcvf_vdpa_init_log) { ifcvf_vdpa_logtype = rte_log_register("pmd.net.ifcvf_vdpa"); if (ifcvf_vdpa_logtype >= 0) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 997683d3b7..26b192737f 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -8584,9 +8584,7 @@ RTE_PMD_REGISTER_PCI(net_ixgbe_vf, rte_ixgbevf_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe_vf, pci_id_ixgbevf_map); RTE_PMD_REGISTER_KMOD_DEP(net_ixgbe_vf, "* igb_uio | vfio-pci"); -RTE_INIT(ixgbe_init_log); -static void -ixgbe_init_log(void) +RTE_INIT(ixgbe_init_log) { ixgbe_logtype_init = rte_log_register("pmd.net.ixgbe.init"); if (ixgbe_logtype_init >= 0) diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 04cab248ee..b038fbf1a9 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -488,9 +488,7 @@ static struct rte_vdev_driver eth_kni_drv = { RTE_PMD_REGISTER_VDEV(net_kni, eth_kni_drv); RTE_PMD_REGISTER_PARAM_STRING(net_kni, ETH_KNI_NO_REQUEST_THREAD_ARG "="); -RTE_INIT(eth_kni_init_log); -static void -eth_kni_init_log(void) +RTE_INIT(eth_kni_init_log) { eth_kni_logtype = rte_log_register("pmd.net.kni"); if (eth_kni_logtype >= 0) diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index 64b1b86ca5..93e89007a8 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -2143,9 +2143,7 @@ RTE_PMD_REGISTER_PCI(net_liovf, rte_liovf_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_liovf, pci_id_liovf_map); RTE_PMD_REGISTER_KMOD_DEP(net_liovf, "* igb_uio | vfio-pci"); -RTE_INIT(lio_init_log); -static void -lio_init_log(void) +RTE_INIT(lio_init_log) { lio_logtype_init = rte_log_register("pmd.net.liquidio.init"); if (lio_logtype_init >= 0) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index d151a9055c..06921c9705 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -955,9 +955,7 @@ glue_error: /** * Driver initialization routine. */ -RTE_INIT(rte_mlx4_pmd_init); -static void -rte_mlx4_pmd_init(void) +RTE_INIT(rte_mlx4_pmd_init) { /* * MLX4_DEVICE_FATAL_CLEANUP tells ibv_destroy functions we diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index d081bdd05e..8afb29c667 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -1386,9 +1386,7 @@ glue_error: /** * Driver initialization routine. */ -RTE_INIT(rte_mlx5_pmd_init); -static void -rte_mlx5_pmd_init(void) +RTE_INIT(rte_mlx5_pmd_init) { /* Initialize driver log type. */ mlx5_logtype = rte_log_register("pmd.net.mlx5"); diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index 85a04fbb4d..a2d0576eb7 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -2753,9 +2753,7 @@ static struct rte_vdev_driver pmd_mrvl_drv = { RTE_PMD_REGISTER_VDEV(net_mvpp2, pmd_mrvl_drv); RTE_PMD_REGISTER_ALIAS(net_mvpp2, eth_mvpp2); -RTE_INIT(mrvl_init_log); -static void -mrvl_init_log(void) +RTE_INIT(mrvl_init_log) { mrvl_logtype = rte_log_register("pmd.net.mvpp2"); if (mrvl_logtype >= 0) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 30d3cd97b3..6e5e305f1d 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -3284,9 +3284,7 @@ RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map); RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio"); RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio"); -RTE_INIT(nfp_init_log); -static void -nfp_init_log(void) +RTE_INIT(nfp_init_log) { nfp_logtype_init = rte_log_register("pmd.net.nfp.init"); if (nfp_logtype_init >= 0) diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 38c8c42bce..d85d25f7e1 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -698,9 +698,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_null, "size= " "copy="); -RTE_INIT(eth_null_init_log); -static void -eth_null_init_log(void) +RTE_INIT(eth_null_init_log) { eth_null_logtype = rte_log_register("pmd.net.null"); if (eth_null_logtype >= 0) diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index 6eb6836d28..20e99902f6 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -46,9 +46,7 @@ int otx_net_logtype_mbox; int otx_net_logtype_init; int otx_net_logtype_driver; -RTE_INIT(otx_net_init_log); -static void -otx_net_init_log(void) +RTE_INIT(otx_net_init_log) { otx_net_logtype_mbox = rte_log_register("pmd.net.octeontx.mbox"); if (otx_net_logtype_mbox >= 0) diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 4c4604c6e4..b8fd7cfaea 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -1080,9 +1080,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_pcap, ETH_PCAP_TX_IFACE_ARG "= " ETH_PCAP_IFACE_ARG "="); -RTE_INIT(eth_pcap_init_log); -static void -eth_pcap_init_log(void) +RTE_INIT(eth_pcap_init_log) { eth_pcap_logtype = rte_log_register("pmd.net.pcap"); if (eth_pcap_logtype >= 0) diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index eb2a229928..4a26836534 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -3428,9 +3428,7 @@ RTE_PMD_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map); RTE_PMD_REGISTER_KMOD_DEP(net_qede_vf, "* igb_uio | vfio-pci"); -RTE_INIT(qede_init_log); -static void -qede_init_log(void) +RTE_INIT(qede_init_log) { qede_logtype_init = rte_log_register("pmd.net.qede.init"); if (qede_logtype_init >= 0) diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 5aa48da429..791deb0bb8 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -685,9 +685,7 @@ RTE_PMD_REGISTER_ALIAS(net_ring, eth_ring); RTE_PMD_REGISTER_PARAM_STRING(net_ring, ETH_RING_NUMA_NODE_ACTION_ARG "=name:node:action(ATTACH|CREATE)"); -RTE_INIT(eth_ring_init_log); -static void -eth_ring_init_log(void) +RTE_INIT(eth_ring_init_log) { eth_ring_logtype = rte_log_register("pmd.net.ring"); if (eth_ring_logtype >= 0) diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index 531539e84f..fc39851fb0 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -2094,9 +2094,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_sfc_efx, SFC_KVARG_RXD_WAIT_TIMEOUT_NS "= " SFC_KVARG_STATS_UPDATE_PERIOD_MS "="); -RTE_INIT(sfc_driver_register_logtype); -static void -sfc_driver_register_logtype(void) +RTE_INIT(sfc_driver_register_logtype) { int ret; diff --git a/drivers/net/softnic/rte_eth_softnic.c b/drivers/net/softnic/rte_eth_softnic.c index 9360cf6c38..65166c1adf 100644 --- a/drivers/net/softnic/rte_eth_softnic.c +++ b/drivers/net/softnic/rte_eth_softnic.c @@ -844,9 +844,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_softnic, PMD_PARAM_HARD_NAME "= " PMD_PARAM_HARD_TX_QUEUE_ID "="); -RTE_INIT(pmd_softnic_init_log); -static void -pmd_softnic_init_log(void) +RTE_INIT(pmd_softnic_init_log) { pmd_softnic_logtype = rte_log_register("pmd.net.softnic"); if (pmd_softnic_logtype >= 0) diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index 829ad13fae..1d20cb51b6 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -1923,9 +1923,7 @@ RTE_PMD_REGISTER_PCI_TABLE(RTE_SZEDATA2_DRIVER_NAME, rte_szedata2_pci_id_table); RTE_PMD_REGISTER_KMOD_DEP(RTE_SZEDATA2_DRIVER_NAME, "* combo6core & combov3 & szedata2 & ( szedata2_cv3 | szedata2_cv3_fdt )"); -RTE_INIT(szedata2_init_log); -static void -szedata2_init_log(void) +RTE_INIT(szedata2_init_log) { szedata2_logtype_init = rte_log_register("pmd.net.szedata2.init"); if (szedata2_logtype_init >= 0) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index d137f58d78..4493507ed9 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -2077,9 +2077,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_tap, ETH_TAP_REMOTE_ARG "="); int tap_logtype; -RTE_INIT(tap_init_log); -static void -tap_init_log(void) +RTE_INIT(tap_init_log) { tap_logtype = rte_log_register("pmd.net.tap"); if (tap_logtype >= 0) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 76fed9f99b..5e15a88a53 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -53,9 +53,7 @@ static void nicvf_dev_stop_cleanup(struct rte_eth_dev *dev, bool cleanup); static void nicvf_vf_stop(struct rte_eth_dev *dev, struct nicvf *nic, bool cleanup); -RTE_INIT(nicvf_init_log); -static void -nicvf_init_log(void) +RTE_INIT(nicvf_init_log) { nicvf_logtype_mbox = rte_log_register("pmd.net.thunderx.mbox"); if (nicvf_logtype_mbox >= 0) diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index eb1afe691e..47b33456c2 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -1457,9 +1457,7 @@ RTE_PMD_REGISTER_PARAM_STRING(net_vhost, "iface= " "queues="); -RTE_INIT(vhost_init_log); -static void -vhost_init_log(void) +RTE_INIT(vhost_init_log) { vhost_logtype = rte_log_register("pmd.net.vhost"); if (vhost_logtype >= 0) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 0f880ef821..614357da74 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1786,9 +1786,7 @@ static struct rte_pci_driver rte_virtio_pmd = { .remove = eth_virtio_pci_remove, }; -RTE_INIT(rte_virtio_pmd_init); -static void -rte_virtio_pmd_init(void) +RTE_INIT(rte_virtio_pmd_init) { if (rte_eal_iopl_init() != 0) { PMD_INIT_LOG(ERR, "IOPL call failed - cannot use virtio PMD"); @@ -2210,9 +2208,7 @@ RTE_PMD_EXPORT_NAME(net_virtio, __COUNTER__); RTE_PMD_REGISTER_PCI_TABLE(net_virtio, pci_id_virtio_map); RTE_PMD_REGISTER_KMOD_DEP(net_virtio, "* igb_uio | uio_pci_generic | vfio-pci"); -RTE_INIT(virtio_init_log); -static void -virtio_init_log(void) +RTE_INIT(virtio_init_log) { virtio_logtype_init = rte_log_register("pmd.net.virtio.init"); if (virtio_logtype_init >= 0) diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index ace9d37c51..2613cd1358 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -1320,9 +1320,7 @@ RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd); RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map); RTE_PMD_REGISTER_KMOD_DEP(net_vmxnet3, "* igb_uio | uio_pci_generic | vfio-pci"); -RTE_INIT(vmxnet3_init_log); -static void -vmxnet3_init_log(void) +RTE_INIT(vmxnet3_init_log) { vmxnet3_logtype_init = rte_log_register("pmd.net.vmxnet3.init"); if (vmxnet3_logtype_init >= 0) diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c index 095a34b29f..469960a3e5 100644 --- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c +++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c @@ -289,10 +289,7 @@ static struct rte_vdev_driver dpaa2_cmdif_drv = { RTE_PMD_REGISTER_VDEV(DPAA2_CMDIF_PMD_NAME, dpaa2_cmdif_drv); -RTE_INIT(dpaa2_cmdif_init_log); - -static void -dpaa2_cmdif_init_log(void) +RTE_INIT(dpaa2_cmdif_init_log) { dpaa2_cmdif_logtype = rte_log_register("pmd.raw.dpaa2.cmdif"); if (dpaa2_cmdif_logtype >= 0) diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c index 1d15c3029f..518d65aa07 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c @@ -992,9 +992,7 @@ static struct rte_dpaa2_driver rte_dpaa2_qdma_pmd = { RTE_PMD_REGISTER_DPAA2(dpaa2_qdma, rte_dpaa2_qdma_pmd); -RTE_INIT(dpaa2_qdma_init_log); -static void -dpaa2_qdma_init_log(void) +RTE_INIT(dpaa2_qdma_init_log) { dpaa2_qdma_logtype = rte_log_register("pmd.raw.dpaa2.qdma"); if (dpaa2_qdma_logtype >= 0) diff --git a/drivers/raw/ifpga_rawdev/ifpga_rawdev.c b/drivers/raw/ifpga_rawdev/ifpga_rawdev.c index 030ed1b64a..3fed05781e 100644 --- a/drivers/raw/ifpga_rawdev/ifpga_rawdev.c +++ b/drivers/raw/ifpga_rawdev/ifpga_rawdev.c @@ -517,9 +517,7 @@ RTE_PMD_REGISTER_PCI(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd); RTE_PMD_REGISTER_PCI_TABLE(ifpga_rawdev_pci_driver, rte_ifpga_rawdev_pmd); RTE_PMD_REGISTER_KMOD_DEP(ifpga_rawdev_pci_driver, "* igb_uio | uio_pci_generic | vfio-pci"); -RTE_INIT(ifpga_rawdev_init_log); -static void -ifpga_rawdev_init_log(void) +RTE_INIT(ifpga_rawdev_init_log) { ifpga_rawdev_logtype = rte_log_register("driver.raw.init"); if (ifpga_rawdev_logtype >= 0) diff --git a/drivers/raw/skeleton_rawdev/skeleton_rawdev.c b/drivers/raw/skeleton_rawdev/skeleton_rawdev.c index 6bdbbb50d0..d1489f8ec0 100644 --- a/drivers/raw/skeleton_rawdev/skeleton_rawdev.c +++ b/drivers/raw/skeleton_rawdev/skeleton_rawdev.c @@ -744,10 +744,7 @@ static struct rte_vdev_driver skeleton_pmd_drv = { RTE_PMD_REGISTER_VDEV(SKELETON_PMD_RAWDEV_NAME, skeleton_pmd_drv); -RTE_INIT(skeleton_pmd_init_log); - -static void -skeleton_pmd_init_log(void) +RTE_INIT(skeleton_pmd_init_log) { skeleton_pmd_logtype = rte_log_register("rawdev.skeleton"); if (skeleton_pmd_logtype >= 0) diff --git a/lib/librte_bbdev/rte_bbdev.c b/lib/librte_bbdev/rte_bbdev.c index 28434e0848..c4cc18d989 100644 --- a/lib/librte_bbdev/rte_bbdev.c +++ b/lib/librte_bbdev/rte_bbdev.c @@ -1125,9 +1125,7 @@ rte_bbdev_op_type_str(enum rte_bbdev_op_type op_type) return NULL; } -RTE_INIT(rte_bbdev_init_log); -static void -rte_bbdev_init_log(void) +RTE_INIT(rte_bbdev_init_log) { bbdev_logtype = rte_log_register("lib.bbdev"); if (bbdev_logtype >= 0) diff --git a/lib/librte_bpf/bpf.c b/lib/librte_bpf/bpf.c index dc6d109913..f590c8c3fd 100644 --- a/lib/librte_bpf/bpf.c +++ b/lib/librte_bpf/bpf.c @@ -53,10 +53,7 @@ bpf_jit(struct rte_bpf *bpf) return rc; } -RTE_INIT(rte_bpf_init_log); - -static void -rte_bpf_init_log(void) +RTE_INIT(rte_bpf_init_log) { rte_bpf_logtype = rte_log_register("lib.bpf"); if (rte_bpf_logtype >= 0) diff --git a/lib/librte_compressdev/rte_compressdev.c b/lib/librte_compressdev/rte_compressdev.c index 6a38917dd4..9091dd6eed 100644 --- a/lib/librte_compressdev/rte_compressdev.c +++ b/lib/librte_compressdev/rte_compressdev.c @@ -764,10 +764,7 @@ rte_compressdev_name_get(uint8_t dev_id) return dev->data->name; } -RTE_INIT(rte_compressdev_log); - -static void -rte_compressdev_log(void) +RTE_INIT(rte_compressdev_log) { compressdev_logtype = rte_log_register("lib.compressdev"); if (compressdev_logtype >= 0) diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h index 92763d7db1..6ff49d64d8 100644 --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h @@ -471,8 +471,7 @@ uint8_t rte_cryptodev_allocate_driver(struct cryptodev_driver *crypto_drv, #define RTE_PMD_REGISTER_CRYPTO_DRIVER(crypto_drv, drv, driver_id)\ -RTE_INIT(init_ ##driver_id);\ -static void init_ ##driver_id(void)\ +RTE_INIT(init_ ##driver_id)\ {\ driver_id = rte_cryptodev_allocate_driver(&crypto_drv, &(drv));\ } diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c index 818118944a..c714a4bd26 100644 --- a/lib/librte_eal/common/eal_common_log.c +++ b/lib/librte_eal/common/eal_common_log.c @@ -335,9 +335,7 @@ static const struct logtype logtype_strings[] = { }; /* Logging should be first initializer (before drivers and bus) */ -RTE_INIT_PRIO(rte_log_init, LOG); -static void -rte_log_init(void) +RTE_INIT_PRIO(rte_log_init, LOG) { uint32_t i; diff --git a/lib/librte_eal/common/include/rte_bus.h b/lib/librte_eal/common/include/rte_bus.h index eb9eded4e8..88f99d581e 100644 --- a/lib/librte_eal/common/include/rte_bus.h +++ b/lib/librte_eal/common/include/rte_bus.h @@ -325,8 +325,7 @@ enum rte_iova_mode rte_bus_get_iommu_class(void); * The constructor has higher priority than PMD constructors. */ #define RTE_REGISTER_BUS(nm, bus) \ -RTE_INIT_PRIO(businitfn_ ##nm, BUS); \ -static void businitfn_ ##nm(void) \ +RTE_INIT_PRIO(businitfn_ ##nm, BUS) \ {\ (bus).name = RTE_STR(nm);\ rte_bus_register(&bus); \ diff --git a/lib/librte_eal/common/include/rte_tailq.h b/lib/librte_eal/common/include/rte_tailq.h index 8dccaefc55..9b01abb2c2 100644 --- a/lib/librte_eal/common/include/rte_tailq.h +++ b/lib/librte_eal/common/include/rte_tailq.h @@ -119,8 +119,7 @@ struct rte_tailq_head *rte_eal_tailq_lookup(const char *name); int rte_eal_tailq_register(struct rte_tailq_elem *t); #define EAL_REGISTER_TAILQ(t) \ -RTE_INIT(tailqinitfn_ ##t); \ -static void tailqinitfn_ ##t(void) \ +RTE_INIT(tailqinitfn_ ##t) \ { \ if (rte_eal_tailq_register(&t) < 0) \ rte_panic("Cannot initialize tailq: %s\n", t.name); \ diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index 16b8258a76..3d556a82f5 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -4407,9 +4407,7 @@ parse_cleanup: return result; } -RTE_INIT(ethdev_init_log); -static void -ethdev_init_log(void) +RTE_INIT(ethdev_init_log) { rte_eth_dev_logtype = rte_log_register("lib.ethdev"); if (rte_eth_dev_logtype >= 0) diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c index 6f1d672ce0..79070d4840 100644 --- a/lib/librte_eventdev/rte_event_timer_adapter.c +++ b/lib/librte_eventdev/rte_event_timer_adapter.c @@ -1282,9 +1282,7 @@ static const struct rte_event_timer_adapter_ops sw_event_adapter_timer_ops = { .cancel_burst = sw_event_timer_cancel_burst, }; -RTE_INIT(event_timer_adapter_init_log); -static void -event_timer_adapter_init_log(void) +RTE_INIT(event_timer_adapter_init_log) { evtim_logtype = rte_log_register("lib.eventdev.adapter.timer"); if (evtim_logtype >= 0) diff --git a/lib/librte_flow_classify/rte_flow_classify.c b/lib/librte_flow_classify/rte_flow_classify.c index 591d98e258..4c3469da1d 100644 --- a/lib/librte_flow_classify/rte_flow_classify.c +++ b/lib/librte_flow_classify/rte_flow_classify.c @@ -673,10 +673,7 @@ rte_flow_classifier_query(struct rte_flow_classifier *cls, return ret; } -RTE_INIT(librte_flow_classify_init_log); - -static void -librte_flow_classify_init_log(void) +RTE_INIT(librte_flow_classify_init_log) { librte_flow_classify_logtype = rte_log_register("lib.flow_classify"); diff --git a/lib/librte_member/rte_member.c b/lib/librte_member/rte_member.c index e147dd1f16..702c01d3b4 100644 --- a/lib/librte_member/rte_member.c +++ b/lib/librte_member/rte_member.c @@ -297,10 +297,7 @@ rte_member_reset(const struct rte_member_setsum *setsum) } } -RTE_INIT(librte_member_init_log); - -static void -librte_member_init_log(void) +RTE_INIT(librte_member_init_log) { librte_member_logtype = rte_log_register("lib.member"); if (librte_member_logtype >= 0) diff --git a/lib/librte_rawdev/rte_rawdev.c b/lib/librte_rawdev/rte_rawdev.c index 284e6aec8f..81da446069 100644 --- a/lib/librte_rawdev/rte_rawdev.c +++ b/lib/librte_rawdev/rte_rawdev.c @@ -532,10 +532,7 @@ rte_rawdev_pmd_release(struct rte_rawdev *rawdev) return 0; } -RTE_INIT(librawdev_init_log); - -static void -librawdev_init_log(void) +RTE_INIT(librawdev_init_log) { librawdev_logtype = rte_log_register("lib.rawdev"); if (librawdev_logtype >= 0) -- 2.20.1