From: riku.voipio@linaro.org
To: qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@linaro.org>
Subject: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user
Date: Mon, 26 Sep 2016 22:58:54 +0300 [thread overview]
Message-ID: <1474919934-21518-1-git-send-email-riku.voipio@linaro.org> (raw)
From: Riku Voipio <riku.voipio@linaro.org>
Linux-user and bsd-user code needs lots of arch-specific ifdefs,
so disable the warning.
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
---
scripts/checkpatch.pl | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index dde3f5f..98a007f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2405,8 +2405,9 @@ sub process {
}
# check of hardware specific defines
# we have e.g. CONFIG_LINUX and CONFIG_WIN32 for common cases
-# where they might be necessary.
- if ($line =~ m@^.\s*\#\s*if.*\b__@) {
+# where they might be necessary. Skip test on linux-user and bsd-user
+# where arch defines are needed
+ if (!($realfile =~ /^(linux|bsd)-user/) && $line =~ m@^.\s*\#\s*if.*\b__@) {
ERROR("architecture specific defines should be avoided\n" . $herecurr);
}
--
2.1.4
next reply other threads:[~2016-09-26 20:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 19:58 riku.voipio [this message]
2016-09-26 20:03 ` [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user no-reply
2016-09-26 21:08 ` Peter Maydell
2016-09-26 23:36 ` Riku Voipio
2016-09-27 0:21 ` Peter Maydell
2016-09-27 11:58 ` Paolo Bonzini
2016-09-27 13:36 ` Riku Voipio
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=1474919934-21518-1-git-send-email-riku.voipio@linaro.org \
--to=riku.voipio@linaro.org \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).