From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD7BFC4321A for ; Fri, 28 Jun 2019 13:39:03 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 62167208E3 for ; Fri, 28 Jun 2019 13:39:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=monjalon.net header.i=@monjalon.net header.b="dvojLlhN"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="sKAH4X59" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 62167208E3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=monjalon.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A871E4CC0; Fri, 28 Jun 2019 15:39:02 +0200 (CEST) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id B2D9C4C8B for ; Fri, 28 Jun 2019 15:39:01 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id E086D204B; Fri, 28 Jun 2019 09:39:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 28 Jun 2019 09:39:00 -0400 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:content-type; s=mesmtp; bh=ViMVK59mGD0FcBMwb+rY6zwjkM4VGhEnoSblImP/858=; b=dvojLlhNqL8h DtNioRVBJw1AbDuW8mOSmvyVcObV/32FfTmfHtuPyJSSKfnxo2HrpeM0ATQkQbob II47dMzKk46Z9mo0s6YjOAHQdcDAJmeI83gYj+y/j+Yw3M8wr3ZVTlykRskieMna EI4ZEIurwtFE/25k6KfYrUfT9rMeTog= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :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=fm3; bh=ViMVK59mGD0FcBMwb+rY6zwjkM4VGhEnoSblImP/8 58=; b=sKAH4X59G77HmHhMZUj7LLWl4JYbAzwaJGslGjYbFmd/clIY3EdpAOiNg O904249ti3pbAgA0CxXkcVJ5c7Sg9TScXlLf5H0VoI611sy4wHhtxs3dJew00CT3 7X4vs4sYmHSF9D8FfmHa46UopugboBGMaANPV9VGVYIoWt0SntxSRgK5LVUgnoEv loi7zEcMCDupPNYvwruCHIPEhVWu6DJMAodJ+ciNLkZ5dCRq9aOyrapWhlX4bvgi eCX6PeOPlnPJiqLRS8i0VSnJkxF/nB/2zTSaai8Ra9NHqsuZxu7x4eETqw//scmm 8phqkgss0zh2GhgAAS2zX2dcVqhUA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrvddtgdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 45A17380076; Fri, 28 Jun 2019 09:38:55 -0400 (EDT) From: Thomas Monjalon To: =?ISO-8859-1?Q?Ga=EBtan?= Rivet , Adrien Mazarguil Cc: dev@dpdk.org, David Marchand , nhorman@tuxdriver.com, aconole@redhat.com, Wenzhuo Lu , Konstantin Ananyev , Jasvinder Singh , Cristian Dumitrescu , Amr Mokhtar , Fiona Trahe , Pablo de Lara , Ashish Gupta , Declan Doherty , Bruce Richardson , Joyce Kong , Anatoly Burakov , Harry van Haaren , Ferruh Yigit , Andrew Rybchenko , Nikhil Rao , Jerin Jacob , Bernard Iremonger , Yipeng Wang , Sameh Gobriel , Olivier Matz , David Hunt , Honnappa Nagarahalli , Akhil Goyal , Gage Eads , Kevin Laatz , Robert Sanford , Erik Gabriel Carrillo , Maxime Coquelin , Tiwei Bie , Zhihong Wang Date: Fri, 28 Jun 2019 15:38:54 +0200 Message-ID: <2360581.DiOFlDEQ0S@xps> In-Reply-To: <20190627123859.aixiatdlmm5okgt7@bidouze.vm.6wind.com> References: <1561635235-22238-1-git-send-email-david.marchand@redhat.com> <20190627122359.GN4284@6wind.com> <20190627123859.aixiatdlmm5okgt7@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 9/9] enforce __rte_experimental at the start of symbol declarations 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" 27/06/2019 14:38, Ga=C3=ABtan Rivet: > On Thu, Jun 27, 2019 at 02:23:59PM +0200, Adrien Mazarguil wrote: > > Hey David, > >=20 > > On Thu, Jun 27, 2019 at 01:33:55PM +0200, David Marchand wrote: > > > Putting a '__attribute__((deprecated))' in the middle of a function > > > prototype does not result in the expected result with gcc (while clang > > > is fine with this syntax). > > >=20 > > > $ cat deprecated.c > > > void * __attribute__((deprecated)) incorrect() { return 0; } > > > __attribute__((deprecated)) void *correct(void) { return 0; } > > > int main(int argc, char *argv[]) { incorrect(); correct(); return 0; } > > > $ gcc -o deprecated.o -c deprecated.c > > > deprecated.c: In function =E2=80=98main=E2=80=99: > > > deprecated.c:3:1: warning: =E2=80=98correct=E2=80=99 is deprecated (d= eclared at > > > deprecated.c:2) [-Wdeprecated-declarations] > > > int main(int argc, char *argv[]) { incorrect(); correct(); return 0;= } > > > ^ > > >=20 > > > Let's enforce the tag is at the very start of the lines, this is not > > > perfect but we will trust reviewers to catch the other not so easy to > > > detect patterns. > > >=20 > > > tag=3D__rte_experimental > > > git grep -l [^^]$tag |grep \\.h$ |while read file; do > > > [ "$file" !=3D 'lib/librte_eal/common/include/rte_compat.h' ] || > > > continue > > > sed -i -e 's#^\(.*\) *'$tag'#'$tag' \1#' $file > > > sed -i -e 's#^\(..*\)'$tag'#'$tag' \1#' $file > > > done > >=20 > > Just a suggestion, how about putting __rte_experimental on its own line > > before the actual prototype? So that instead of: > >=20 > > __rte_experimental struct rte_compressdev * __rte_experimental > > rte_compressdev_pmd_get_named_dev(const char *name); > >=20 > > We'd get: > >=20 > > __rte_experimental > > struct rte_compressdev * > > rte_compressdev_pmd_get_named_dev(const char *name); > >=20 > > I personally find the latter much more readable. >=20 > +1, with the added benefit of having only one line to remove when > making the API stable, which is critical. You're right, but it needs a different check. Given it is minor and we don't have a patch, I will merge David's version, except if you can provide a patch quickly.