From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id A18482C37 for ; Sun, 28 Oct 2018 11:48:08 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 39DA621D0C; Sun, 28 Oct 2018 06:48:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 28 Oct 2018 06:48:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=mesmtp; bh=9aMh0eFHcrltq73k502ey8W 6y23kjpqKrXndy7rQ6Uk=; b=NRUNksnhcEX/0yUQiNGkaAGXQipV1D6K2AooYdU 71ehwV0SFPUAdom0EtUpuN3U9pYgf1a+39NlvCWfAOMdcWRbT1JiQUcbBggMW/bn gLwQalSs4pBDeW9wxsmxSCT2V988jhZ2+nRIwOtvK3QzD8Go9K8NLuA0oerEiRoP dMVw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=9aMh0eFHcrltq73k5 02ey8W6y23kjpqKrXndy7rQ6Uk=; b=uvjasSvmxsZBRZAQUn0R6aOjae9ceYU2V oRbNahk6fnUx7+cvDU/Wh/su+XNCTgDOvHg0QAarx/br4URsIFAI4zSFU/SIQZCE SSEdzbzlPZkHxo9bBgTPB0nnzKZa8i9rr1TQil2iTTP8R0hVEWgMtvP4c9liHmyo CFSROjFce3stmKdGYMp8wd8dO18FiEHLaICrkfBqbE70N3HKV3iZZBGMvh+DmE9w 0p8ji5B9v+SZsriP/tz7NtCZcuGvaWbk4DSIDxgeSnEoa2JxYbcCHeMfhUS849Jh j+1U7v+Ur5DkO+yrCIFBT4fwJB7o4FSkG2q45lIudUtYY6oXIq+cw== X-ME-Sender: X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 793D9102E8; Sun, 28 Oct 2018 06:48:06 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger , Ashish Gupta , Fiona Trahe , Pablo de Lara , Sunila Sahu , "K. Y. Srinivasan" , Haiyang Zhang Cc: dev@dpdk.org Date: Sun, 28 Oct 2018 11:47:47 +0100 Message-Id: <20181028104748.32562-1-thomas@monjalon.net> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] drivers: remove useless constructor headers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Oct 2018 10:48:08 -0000 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 2839fef5b..4cf73ce81 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 9d13f9331..cc35c0438 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 7d6871b14..5a4d47d4d 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 aa38ee7a3..b330bf3d7 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.19.0