From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boc4f-0006ZJ-8S for qemu-devel@nongnu.org; Mon, 26 Sep 2016 16:00:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boc4a-0006gx-BY for qemu-devel@nongnu.org; Mon, 26 Sep 2016 16:00:25 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:35585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boc4a-0006IH-65 for qemu-devel@nongnu.org; Mon, 26 Sep 2016 16:00:20 -0400 Received: by mail-pf0-f178.google.com with SMTP id s13so34655151pfd.2 for ; Mon, 26 Sep 2016 12:59:58 -0700 (PDT) From: riku.voipio@linaro.org Date: Mon, 26 Sep 2016 22:58:54 +0300 Message-Id: <1474919934-21518-1-git-send-email-riku.voipio@linaro.org> Subject: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio From: Riku Voipio Linux-user and bsd-user code needs lots of arch-specific ifdefs, so disable the warning. Signed-off-by: Riku Voipio --- 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