From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, nhorman@tuxdriver.com, aconole@redhat.com,
thomas@monjalon.net, 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>
Subject: Re: [dpdk-dev] [PATCH 9/9] enforce __rte_experimental at the start of symbol declarations
Date: Thu, 27 Jun 2019 14:23:59 +0200 [thread overview]
Message-ID: <20190627122359.GN4284@6wind.com> (raw)
In-Reply-To: <1561635235-22238-10-git-send-email-david.marchand@redhat.com>
Hey David,
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).
>
> $ 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 ‘main’:
> deprecated.c:3:1: warning: ‘correct’ is deprecated (declared at
> deprecated.c:2) [-Wdeprecated-declarations]
> int main(int argc, char *argv[]) { incorrect(); correct(); return 0; }
> ^
>
> 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.
>
> tag=__rte_experimental
> git grep -l [^^]$tag |grep \\.h$ |while read file; do
> [ "$file" != '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
Just a suggestion, how about putting __rte_experimental on its own line
before the actual prototype? So that instead of:
__rte_experimental struct rte_compressdev * __rte_experimental
rte_compressdev_pmd_get_named_dev(const char *name);
We'd get:
__rte_experimental
struct rte_compressdev *
rte_compressdev_pmd_get_named_dev(const char *name);
I personally find the latter much more readable.
Here's the relevant sed expression:
sed -i \
-e '/^\([^#].*\)__rte_experimental */{' \
-e 's//\1/; s/ *$//; i\' \
-e __rte_experimental \
-e '}' \
$(git grep -l __rte_experimental -- '*.h')
Otherwise this series looks good to me.
--
Adrien Mazarguil
6WIND
next prev parent reply other threads:[~2019-06-27 12:24 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-27 11:33 [dpdk-dev] [PATCH 0/9] experimental tags fixes David Marchand
2019-06-27 11:33 ` [dpdk-dev] [PATCH 1/9] eal: hide internal hotplug symbol David Marchand
2019-06-28 16:25 ` Stephen Hemminger
2019-06-27 11:33 ` [dpdk-dev] [PATCH 2/9] devargs: remove incorrect experimental tags David Marchand
2019-06-28 16:23 ` Stephen Hemminger
2019-06-27 11:33 ` [dpdk-dev] [PATCH 3/9] vfio: remove incorrect experimental tag David Marchand
2019-06-28 16:24 ` Stephen Hemminger
2019-06-27 11:33 ` [dpdk-dev] [PATCH 4/9] raw/dpaa2_qdma: " David Marchand
2019-06-27 11:33 ` [dpdk-dev] [PATCH 5/9] buildtools: detect discrepancies for experimental symbols David Marchand
2019-06-27 11:33 ` [dpdk-dev] [PATCH 6/9] net/atlantic: add missing experimental api tags David Marchand
2019-06-27 11:33 ` [dpdk-dev] [PATCH 7/9] mem: remove incorrect experimental tag on static symbol David Marchand
2019-06-27 11:33 ` [dpdk-dev] [PATCH 8/9] remove experimental tags from all symbol definitions David Marchand
2019-06-28 15:56 ` Thomas Monjalon
2019-06-28 19:20 ` David Marchand
2019-06-29 5:57 ` David Marchand
2019-06-29 6:19 ` David Marchand
2019-07-01 9:57 ` Laatz, Kevin
2019-06-27 11:33 ` [dpdk-dev] [PATCH 9/9] enforce __rte_experimental at the start of symbol declarations David Marchand
2019-06-27 12:23 ` Adrien Mazarguil [this message]
2019-06-27 12:38 ` Gaëtan Rivet
2019-06-28 13:38 ` Thomas Monjalon
2019-06-28 19:58 ` [dpdk-dev] [PATCH 0/9] experimental tags fixes Neil Horman
2019-06-29 11:58 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand
2019-06-29 11:58 ` [dpdk-dev] [PATCH v2 01/10] eal: hide internal hotplug symbol David Marchand
2019-06-29 11:58 ` [dpdk-dev] [PATCH v2 02/10] devargs: remove incorrect experimental tags David Marchand
2019-06-29 11:58 ` [dpdk-dev] [PATCH v2 03/10] vfio: remove incorrect experimental tag David Marchand
2019-06-29 11:58 ` [dpdk-dev] [PATCH v2 04/10] raw/dpaa2_qdma: " David Marchand
2019-06-29 11:58 ` [dpdk-dev] [PATCH v2 05/10] buildtools: detect discrepancies for experimental symbols David Marchand
2019-06-29 11:58 ` [dpdk-dev] [PATCH v2 06/10] net/atlantic: add missing experimental api tags David Marchand
2019-06-29 11:58 ` [dpdk-dev] [PATCH v2 07/10] mem: remove incorrect experimental tag on static symbol David Marchand
2019-06-29 11:58 ` [dpdk-dev] [PATCH v2 08/10] telemetry: add missing header include David Marchand
2019-06-29 11:58 ` [dpdk-dev] [PATCH v2 09/10] remove experimental tags from all symbol definitions David Marchand
2019-06-29 11:58 ` [dpdk-dev] [PATCH v2 10/10] enforce __rte_experimental at the start of symbol declarations David Marchand
2019-06-29 16:13 ` Thomas Monjalon
2019-06-29 16:39 ` David Marchand
2019-07-01 12:05 ` Aaron Conole
2019-07-01 12:08 ` David Marchand
2019-06-29 17:06 ` [dpdk-dev] [PATCH v2 00/10] experimental tags fixes Thomas Monjalon
2019-07-01 14:15 ` Ferruh Yigit
2019-07-01 14:36 ` David Marchand
2019-07-01 15:30 ` Ferruh Yigit
2019-07-01 19:27 ` David Marchand
2019-07-01 21:12 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190627122359.GN4284@6wind.com \
--to=adrien.mazarguil@6wind.com \
--cc=aconole@redhat.com \
--cc=akhil.goyal@nxp.com \
--cc=amr.mokhtar@intel.com \
--cc=anatoly.burakov@intel.com \
--cc=arybchenko@solarflare.com \
--cc=ashish.gupta@marvell.com \
--cc=bernard.iremonger@intel.com \
--cc=bruce.richardson@intel.com \
--cc=cristian.dumitrescu@intel.com \
--cc=david.hunt@intel.com \
--cc=david.marchand@redhat.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=erik.g.carrillo@intel.com \
--cc=ferruh.yigit@intel.com \
--cc=fiona.trahe@intel.com \
--cc=gage.eads@intel.com \
--cc=harry.van.haaren@intel.com \
--cc=honnappa.nagarahalli@arm.com \
--cc=jasvinder.singh@intel.com \
--cc=jerinj@marvell.com \
--cc=joyce.kong@arm.com \
--cc=kevin.laatz@intel.com \
--cc=konstantin.ananyev@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=nhorman@tuxdriver.com \
--cc=nikhil.rao@intel.com \
--cc=olivier.matz@6wind.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=rsanford@akamai.com \
--cc=sameh.gobriel@intel.com \
--cc=thomas@monjalon.net \
--cc=tiwei.bie@intel.com \
--cc=wenzhuo.lu@intel.com \
--cc=yipeng1.wang@intel.com \
--cc=zhihong.wang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).