From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 030CFA046B
	for <public@inbox.dpdk.org>; Fri, 28 Jun 2019 15:39:02 +0200 (CEST)
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 <dev@dpdk.org>; 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: <xms:chgWXYgR7G_wTWQ6BMh7JM6vVO1n5z4Hy3iWXoMsMn3KND16_Yu6Gg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrvddtgdeilecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefhvffufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhmrghs
 ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph
 epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho
 mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd
X-ME-Proxy: <xmx:chgWXS4PkjukxqwXNRzCYc4lf2fLAzmfhe8ugM12nIu2x3E6Pvh6-g>
 <xmx:chgWXUsH_IOEwhu2T7EWuacKqYScR9KdVCynAXzL42Esi47iV0_Phw>
 <xmx:chgWXXzFaffrrfUyF5gb3ofae90r8CL-2TvAXRG0ElLEqkN7yCUBHg>
 <xmx:dBgWXel3stBvtyqHH_Rihodk6-wEd959HkYeRcYLXTgG9XRLYGaeVQ>
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 <thomas@monjalon.net>
To: =?ISO-8859-1?Q?Ga=EBtan?= Rivet <gaetan.rivet@6wind.com>,
 Adrien Mazarguil <adrien.mazarguil@6wind.com>
Cc: dev@dpdk.org, David Marchand <david.marchand@redhat.com>,
 nhorman@tuxdriver.com, aconole@redhat.com,
 Wenzhuo Lu <wenzhuo.lu@intel.com>,
 Konstantin Ananyev <konstantin.ananyev@intel.com>,
 Jasvinder Singh <jasvinder.singh@intel.com>,
 Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
 Amr Mokhtar <amr.mokhtar@intel.com>, Fiona Trahe <fiona.trahe@intel.com>,
 Pablo de Lara <pablo.de.lara.guarch@intel.com>,
 Ashish Gupta <ashish.gupta@marvell.com>,
 Declan Doherty <declan.doherty@intel.com>,
 Bruce Richardson <bruce.richardson@intel.com>,
 Joyce Kong <joyce.kong@arm.com>,
 Anatoly Burakov <anatoly.burakov@intel.com>,
 Harry van Haaren <harry.van.haaren@intel.com>,
 Ferruh Yigit <ferruh.yigit@intel.com>,
 Andrew Rybchenko <arybchenko@solarflare.com>,
 Nikhil Rao <nikhil.rao@intel.com>, Jerin Jacob <jerinj@marvell.com>,
 Bernard Iremonger <bernard.iremonger@intel.com>,
 Yipeng Wang <yipeng1.wang@intel.com>,
 Sameh Gobriel <sameh.gobriel@intel.com>,
 Olivier Matz <olivier.matz@6wind.com>, David Hunt <david.hunt@intel.com>,
 Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
 Akhil Goyal <akhil.goyal@nxp.com>, Gage Eads <gage.eads@intel.com>,
 Kevin Laatz <kevin.laatz@intel.com>, Robert Sanford <rsanford@akamai.com>,
 Erik Gabriel Carrillo <erik.g.carrillo@intel.com>,
 Maxime Coquelin <maxime.coquelin@redhat.com>,
 Tiwei Bie <tiwei.bie@intel.com>, Zhihong Wang <zhihong.wang@intel.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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.