From: Mike Frysinger <vapier@gentoo.org>
To: Sam Ravnborg <sam@ravnborg.org>, linux-kernel@vger.kernel.org
Subject: [PATCH v2] headers_install.pl: autoconvert asm/inline/volatile to __xxx__
Date: Sat, 27 Dec 2008 03:23:15 -0500 [thread overview]
Message-ID: <1230366195-23989-1-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1230364498-31620-1-git-send-email-vapier@gentoo.org>
Headers in userspace should be using the __xxx__ form of the asm, inline,
and volatile keywords. Since people like to revert these things without
realizing what's going on, have the headers install step autoconvert these
keywords.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
v2
- get asm/volatile to actually work ... i missed this due to other
local patches. "asm volatile" should get fixed now.
| 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
--git a/scripts/headers_install.pl b/scripts/headers_install.pl
index 7d2b414..c6ae405 100644
--- a/scripts/headers_install.pl
+++ b/scripts/headers_install.pl
@@ -36,6 +36,9 @@ foreach my $file (@files) {
$line =~ s/\s__attribute_const__\s/ /g;
$line =~ s/\s__attribute_const__$//g;
$line =~ s/^#include <linux\/compiler.h>//;
+ $line =~ s/(^|\s)(inline)\b/$1__$2__/g;
+ $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
+ $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g;
printf OUTFILE "%s", $line;
}
close OUTFILE;
--
1.6.0.6
next prev parent reply other threads:[~2008-12-27 8:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-27 7:54 [PATCH] " Mike Frysinger
2008-12-27 8:23 ` Mike Frysinger [this message]
2008-12-27 18:56 ` [PATCH v2] " 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
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=1230366195-23989-1-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.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
all inboxes | Powered by JetHome®