From: Arnd Bergmann <arnd@arndb.de>
To: Mike Frysinger <vapier@gentoo.org>
Cc: Sam Ravnborg <sam@ravnborg.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] headers_install.pl: autoconvert asm/inline/volatile to __xxx__
Date: Sat, 3 Jan 2009 03:38:34 +0100 [thread overview]
Message-ID: <200901030338.34968.arnd@arndb.de> (raw)
In-Reply-To: <200901022024.07293.vapier@gentoo.org>
On Saturday 03 January 2009, Mike Frysinger wrote:
> how would you propose maintaining said list ? attempting to maintain external
> to the file in question will just lead to rot (since we dont want to whitelist
> entire files, and we cant track line numbers, and we cant detect where the
> keyword is being used in terms of macro/function) ... that leaves two choices
> that i can think of:
> - a new __asm_userok__ type marker
> - adding a simple /* userok */ comment we can filter in the perl regex
>
> neither of which sounds entire pleasant either ...
It all depends on how many exceptions there are. The number of instances
of asm and volatile keywords is really small (one file each, on x86), so
we can easily decide whether or not they should all be allowed or disallowed.
For inline, we already have a precedent in include/linux/socket.h,
which contains
/*
* This mess will go away with glibc
*/
#if defined(__GNUC__)
#define __KINLINE static __inline__
#elif defined(__cplusplus) /* || __STDC_VERSION__ >= 199901L --arnd */
#define __KINLINE static inline
#else
#define __KINLINE static
#endif
This demonstrates that there are additional problems to consider. In order
to do the right thing, we could first use your patch to fix up all instances
of inline, and then warn about any __inline__ and inline, converting the
legitimate ones to __KINLINE.
Again, there are very few legitimate ones, unless you count the byteorder
headers as correct, which I'm still undecided about.
Arnd <><
prev parent reply other threads:[~2009-01-03 2:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-27 7:54 [PATCH] headers_install.pl: autoconvert asm/inline/volatile to __xxx__ Mike Frysinger
2008-12-27 8:23 ` [PATCH v2] " Mike Frysinger
2008-12-27 18:56 ` Sam Ravnborg
2008-12-29 10:33 ` [PATCH] " H. Peter Anvin
2008-12-29 10:54 ` Mike Frysinger
2008-12-31 17:15 ` Arnd Bergmann
2008-12-31 22:34 ` Mike Frysinger
2009-01-02 23:20 ` Arnd Bergmann
2009-01-03 1:24 ` Mike Frysinger
2009-01-03 2:38 ` Arnd Bergmann [this message]
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=200901030338.34968.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=vapier@gentoo.org \
/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