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: 77053 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp1777068qgf; Tue, 27 Sep 2016 08:15:47 -0700 (PDT) X-Received: by 10.55.188.195 with SMTP id m186mr30395386qkf.180.1474989347861; Tue, 27 Sep 2016 08:15:47 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id x22si1717923qka.104.2016.09.27.08.15.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 27 Sep 2016 08:15:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bou6l-0000aG-DF for patch@linaro.org; Tue, 27 Sep 2016 11:15:47 -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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 --- scripts/checkpatch.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.1.4 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); }