From df285f0e6529401fa8c33e00b1b8f889458dd18b Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Sun, 28 Oct 2018 11:47:47 +0100 Subject: [PATCH] drivers: 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 --- drivers/bus/vmbus/rte_bus_vmbus.h | 3 +-- drivers/compress/octeontx/otx_zip_pmd.c | 5 +---- drivers/compress/zlib/zlib_pmd.c | 4 +--- drivers/net/netvsc/hn_ethdev.c | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/bus/vmbus/rte_bus_vmbus.h b/drivers/bus/vmbus/rte_bus_vmbus.h index 2839fef5b2..4cf73ce815 100644 --- a/drivers/bus/vmbus/rte_bus_vmbus.h +++ b/drivers/bus/vmbus/rte_bus_vmbus.h @@ -407,8 +407,7 @@ void rte_vmbus_unregister(struct rte_vmbus_driver *driver); /** Helper for VMBUS device registration from driver instance */ #define RTE_PMD_REGISTER_VMBUS(nm, vmbus_drv) \ - RTE_INIT(vmbusinitfn_ ##nm); \ - static void vmbusinitfn_ ##nm(void) \ + RTE_INIT(vmbusinitfn_ ##nm) \ { \ (vmbus_drv).driver.name = RTE_STR(nm); \ rte_vmbus_register(&vmbus_drv); \ diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c index 67ff5066fa..a1651b22eb 100644 --- a/drivers/compress/octeontx/otx_zip_pmd.c +++ b/drivers/compress/octeontx/otx_zip_pmd.c @@ -647,10 +647,7 @@ static struct rte_pci_driver octtx_zip_pmd = { RTE_PMD_REGISTER_PCI(COMPRESSDEV_NAME_ZIP_PMD, octtx_zip_pmd); RTE_PMD_REGISTER_PCI_TABLE(COMPRESSDEV_NAME_ZIP_PMD, pci_id_octtx_zipvf_table); -RTE_INIT(octtx_zip_init_log); - -static void -octtx_zip_init_log(void) +RTE_INIT(octtx_zip_init_log) { octtx_zip_logtype_driver = rte_log_register("pmd.compress.octeontx"); if (octtx_zip_logtype_driver >= 0) diff --git a/drivers/compress/zlib/zlib_pmd.c b/drivers/compress/zlib/zlib_pmd.c index 7d6871b143..5a4d47d4d5 100644 --- a/drivers/compress/zlib/zlib_pmd.c +++ b/drivers/compress/zlib/zlib_pmd.c @@ -425,10 +425,8 @@ static struct rte_vdev_driver zlib_pmd_drv = { }; RTE_PMD_REGISTER_VDEV(COMPRESSDEV_NAME_ZLIB_PMD, zlib_pmd_drv); -RTE_INIT(zlib_init_log); -static void -zlib_init_log(void) +RTE_INIT(zlib_init_log) { zlib_logtype_driver = rte_log_register("pmd.compress.zlib"); if (zlib_logtype_driver >= 0) diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index aa38ee7a3e..b330bf3d72 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -879,9 +879,7 @@ static struct rte_vmbus_driver rte_netvsc_pmd = { RTE_PMD_REGISTER_VMBUS(net_netvsc, rte_netvsc_pmd); RTE_PMD_REGISTER_KMOD_DEP(net_netvsc, "* uio_hv_generic"); -RTE_INIT(hn_init_log); -static void -hn_init_log(void) +RTE_INIT(hn_init_log) { hn_logtype_init = rte_log_register("pmd.net.netvsc.init"); if (hn_logtype_init >= 0) -- 2.20.1