From patchwork Tue Sep 27 15:14:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 9352085 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4A89D60757 for ; Tue, 27 Sep 2016 15:15:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C02529260 for ; Tue, 27 Sep 2016 15:15:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3029129267; Tue, 27 Sep 2016 15:15:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 842E629260 for ; Tue, 27 Sep 2016 15:14:59 +0000 (UTC) Received: from localhost ([::1]:51695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bou5y-0000An-3V for patchwork-qemu-devel@patchwork.kernel.org; Tue, 27 Sep 2016 11:14:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bou5f-00009c-NZ for qemu-devel@nongnu.org; Tue, 27 Sep 2016 11:14:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bou5Z-0007PA-R4 for qemu-devel@nongnu.org; Tue, 27 Sep 2016 11:14:38 -0400 Received: from mail-pa0-x236.google.com ([2607:f8b0:400e:c03::236]:34601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bou5Z-0007Of-C8 for qemu-devel@nongnu.org; Tue, 27 Sep 2016 11:14:33 -0400 Received: by mail-pa0-x236.google.com with SMTP id gp7so6583705pac.1 for ; Tue, 27 Sep 2016 08:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=A7+Lhl0b4IwpHhraGHrAcLVYuPp+JzFLdDptwovKVfY=; b=PKZFAoPjOCFBoQ90ja93GymsCH8gQm7qwdZGjxzGUq4V/HSBG4RKx/9StC6j5TsBNb Qyw/F+qYxsyNp85j7E6e36vPMbzOPOR435GNF5XbipCG3K641DkWQIU0niURHtKQjE/3 NCBVV5Oz/C9sEVFoUz//tdVIRS061SN+PAeCs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=A7+Lhl0b4IwpHhraGHrAcLVYuPp+JzFLdDptwovKVfY=; b=bUrx+ysmeEdOGrow1FNpWak8YTWbV2r3PUcJtKubpSz37MeN18zzS+e/DZ/zx47QNw xXkagzGZ84iUbj8WGipNbniGwiurUct5fXB5vMx1KYN/ZyNkfDllzZJfj2HBAbKn8Klt zzK6Yp7mO1dEnlzU+uocL3b8kbttihPi1OIyqRTimDcybTj87jAYhqyMjreCDGS3vEdp TqzviH5HA58HlIh8twEv8ulj+A9wYbikjLRi787vPl/4AzBlxF4J6uIxezGBdR6dEzp+ tzFu2I8n5Ruqzcc5QxEMUflbASLn7ta6mGQjf3g4YXmjb3eLsLkHg6GX3o6ISHVpWI0C BUMw== X-Gm-Message-State: AE9vXwO7CD39GJNq+jOP5Y/LlfEXpAQcmuuLouXOzjgukLZQ+0un/eS/lMpZJ2YlyPAbON1z X-Received: by 10.66.16.38 with SMTP id c6mr48629906pad.64.1474989272349; Tue, 27 Sep 2016 08:14:32 -0700 (PDT) Received: from beaming.home ([67.238.99.186]) by smtp.gmail.com with ESMTPSA id n19sm5741289pfi.50.2016.09.27.08.14.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Sep 2016 08:14:31 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Tue, 27 Sep 2016 18:14:25 +0300 Message-Id: <1474989265-30733-1-git-send-email-riku.voipio@linaro.org> X-Mailer: git-send-email 2.1.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::236 Subject: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for syscall tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, Riku Voipio Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Riku Voipio Linux-user and bsd-user code need ifdef guards for new system calls that aren't implemented on all host/target combinations. Allow ifdefs for system calls when defined as __NR_foo. Signed-off-by: Riku Voipio Acked-by: Paolo Bonzini --- scripts/checkpatch.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3afa19a..e17f445 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2405,8 +2405,10 @@ 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. Ignore __NR and __TARGET_NR +# definitions that are needed for linux-user builds + if (($line =~ m@^.\s*\#\s*if.*\b__@) && + !($realfile =~ /^(linux|bsd)-user/ && $line =~ /__NR_/)) { WARN("architecture specific defines should be avoided\n" . $herecurr); }