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 712C7A04B3; Mon, 10 Feb 2020 17:24:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3F3081C01F; Mon, 10 Feb 2020 17:21:40 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 1D2601BE94 for ; Mon, 10 Feb 2020 17:21:38 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B8E5C21B03; Mon, 10 Feb 2020 11:21:37 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 10 Feb 2020 11:21:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=zMy+j6zOs0 ugUqWsT/XqdrHtHA9/OmkU8ZjogovkN1Q=; b=QAhNRXG8SSJc97gHSzFsQfd1/+ XB9KtKP0U9RtbDgmsxihNIADhheWdU7kbq8Bp2yOHQzgsifshcPXYRvJ4GJniCDm 9MTLD2x2LiFnEYYR1WsV0icm+f7aYOp4ApZNPViZ+gylLMpwvVcb5SOjM1LBkEQG jkZ1V1MB55TriWa2U= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=zMy+j6zOs0ugUqWsT/XqdrHtHA9/OmkU8ZjogovkN1Q=; b=R1O74I8v Z4Iqj9425W5sxmKHDr5dQPxNi7urpGVzxi7E7Mb0kAHyZ+nvHq0C+YSBLjB/dOmx YZlcD6GEPTo5Z5ifhKM5wapg8Ous+a1RgH940loFLa6+CWvJMfDMMFTaiNZsl9uP CorUKoSyWiS6uCBYQiZiNBheYW/FqL4/weqQdBP0eliOHgP1mXjilLs0h1IUPkhb 2xACp8NLSxQiXfpM0V+a1jTENUJe/NYf0tfalNb/GrsIfben8GOc3z3upu83u2Fl KRBMoFwpRtJzT/fb1yLJm+OZCXtPoR4NOcloHqoXcp44TeVVF49grINBSl4J6p3Y wT1a60NoHWR7/A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedriedugdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehm ohhnjhgrlhhonhdrnhgvtheqnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlh hushhtvghrufhiiigvpeduudenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghs sehmohhnjhgrlhhonhdrnhgvth 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 4C4CF3280060 for ; Mon, 10 Feb 2020 11:21:37 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Date: Mon, 10 Feb 2020 17:20:32 +0100 Message-Id: <20200210162032.1177478-16-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 15/15] devtools: check use of compiler 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 keyword __attribute__ will emit a warning, because it is preferred to use or define a common __rte macro. The centralized macros may help to control or workaround some compilers. Signed-off-by: Thomas Monjalon --- devtools/checkpatches.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index b16bace927..bbde89bc99 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -61,6 +61,14 @@ check_forbidden_additions() { # -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 + # refrain from using compiler attribute without defining a common macro + awk -v FOLDERS="lib drivers app examples" \ + -v EXPRESSIONS="__attribute__" \ + -v RET_ON_FAIL=1 \ + -v MESSAGE='Using compiler attribute directly' \ + -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ + "$1" || res=1 + # svg figures must be included with wildcard extension # because of png conversion for pdf docs awk -v FOLDERS='doc' \ -- 2.25.0