From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 88D64A04B3; Mon, 10 Feb 2020 17:23:08 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 689851BFF1; Mon, 10 Feb 2020 17:21:23 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id D06071BC25 for ; Mon, 10 Feb 2020 17:21:20 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8045721AFB; Mon, 10 Feb 2020 11:21:20 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 10 Feb 2020 11:21:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=8+3igouR78 kLgGKOkc/WSm5Ge64a3QdYLmhd7WxOt+A=; b=I/OlesxNR2UmiE5bb+RxvCFn9P e1PcYkZZQoX/dWRiJ751gMTrM1/xDg5+luupL3xA7iOJeQLk5TpypVABZb+K/lRb PiAeH8BTyfNz/7hBrZeXtE6jsXkhEYHTi6C8NT7FZ1482ll8o5mIwG4K3sB5y3CA 0v9b9WCUhKdhqJR/8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=8+3igouR78kLgGKOkc/WSm5Ge64a3QdYLmhd7WxOt+A=; b=0HuLtbd6 ogj71YAv1eiOweBlS8HFaQwTtFKOptIUMwn8wtPUxLSRa2qqgPAgcYFmF1g/ckrZ ATf4wVm4GwUCEXjHmZGlGT7Bdqr8EG8dT4fDEcv4/RMKFoz/2OPFNTJ6PckEYLya 7eiRogmQv3xEqT0YGEi9TyUiWp39spSBYrhDXPX1qJ//hbGyFJXcX3eRod+e//CW hjvKcYn3v5R5xZX3g4EQcM1eoZzZhOG/i1OVOR7Cd21d7Cjkx2CwQ12VVoF5UpK4 iZP2DJvcpg3jCHhLkjTClJBWeZtP9FvSwUU82fFDdFP0GejW2vSddRvFDkF7ELEZ eUnW57IxFHB7fA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedriedugdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgepkeenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth 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 DDDE3328005D; Mon, 10 Feb 2020 11:21:19 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Neil Horman Date: Mon, 10 Feb 2020 17:20:27 +0100 Message-Id: <20200210162032.1177478-11-thomas@monjalon.net> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210162032.1177478-1-thomas@monjalon.net> References: <20200210162032.1177478-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 20.05 10/15] replace used attributes 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The new macro __rte_used, forcing symbol to be generated, is now used where appropriate for consistency. Signed-off-by: Thomas Monjalon --- lib/librte_eal/common/eal_common_options.c | 2 +- lib/librte_eal/common/include/rte_common.h | 5 +++++ lib/librte_eal/common/include/rte_dev.h | 8 ++++---- lib/librte_eal/common/include/rte_function_versioning.h | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 5920233bcd..dcea9a3e9c 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -107,7 +107,7 @@ static const char *default_solib_dir = RTE_EAL_PMD_PATH; * Note: PLEASE DO NOT ALTER THIS without making a corresponding * change to usertools/dpdk-pmdinfo.py */ -static const char dpdk_solib_path[] __attribute__((used)) = +static const char dpdk_solib_path[] __rte_used = "DPDK_PLUGIN_PATH=" RTE_EAL_PMD_PATH; TAILQ_HEAD(device_option_list, device_option); diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h index fc66d9236a..1bd627fa9e 100644 --- a/lib/librte_eal/common/include/rte_common.h +++ b/lib/librte_eal/common/include/rte_common.h @@ -76,6 +76,11 @@ typedef uint16_t unaligned_uint16_t; */ #define __rte_weak __attribute__((__weak__)) +/** + * Force symbol to be generated even if it appears to be unused. + */ +#define __rte_used __attribute__((used)) + /*********** Macros to eliminate unused variable warnings ********/ /** diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index a5c35f00c0..c8d985fb5c 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -205,17 +205,17 @@ typedef int (*rte_dev_cmp_t)(const struct rte_device *dev, const void *data); #define RTE_PMD_EXPORT_NAME(name, idx) \ static const char RTE_PMD_EXPORT_NAME_ARRAY(this_pmd_name, idx) \ -__attribute__((used)) = RTE_STR(name) +__rte_used = RTE_STR(name) #define DRV_EXP_TAG(name, tag) __##name##_##tag #define RTE_PMD_REGISTER_PCI_TABLE(name, table) \ -static const char DRV_EXP_TAG(name, pci_tbl_export)[] __attribute__((used)) = \ +static const char DRV_EXP_TAG(name, pci_tbl_export)[] __rte_used = \ RTE_STR(table) #define RTE_PMD_REGISTER_PARAM_STRING(name, str) \ static const char DRV_EXP_TAG(name, param_string_export)[] \ -__attribute__((used)) = str +__rte_used = str /** * Advertise the list of kernel modules required to run this driver @@ -240,7 +240,7 @@ __attribute__((used)) = str */ #define RTE_PMD_REGISTER_KMOD_DEP(name, str) \ static const char DRV_EXP_TAG(name, kmod_dep_export)[] \ -__attribute__((used)) = str +__rte_used = str /** * Iteration context. diff --git a/lib/librte_eal/common/include/rte_function_versioning.h b/lib/librte_eal/common/include/rte_function_versioning.h index c924351d5e..b9f862d295 100644 --- a/lib/librte_eal/common/include/rte_function_versioning.h +++ b/lib/librte_eal/common/include/rte_function_versioning.h @@ -59,7 +59,7 @@ * that it is being used as an implementation of a particular version of symbol * . */ -#define __vsym __attribute__((used)) +#define __vsym __rte_used /* * MAP_STATIC_SYMBOL -- 2.25.0