From patchwork Mon Sep 26 19:58:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 9351251 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 5FE86601C2 for ; Mon, 26 Sep 2016 20:00:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51BE128E28 for ; Mon, 26 Sep 2016 20:00:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4647628E2E; Mon, 26 Sep 2016 20:00:55 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 15DDE28E28 for ; Mon, 26 Sep 2016 20:00:53 +0000 (UTC) Received: from localhost ([::1]:46425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boc57-0006b9-51 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 26 Sep 2016 16:00:53 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=z2tdjoBzSIG68uEogbOPw0N1EDRgs0VIqX9xiBonWbA=; b=cDb+PbVLkXBk+GaSTcw3Atw7qelMRmYmihMo0YDvS4Crx2IfRxodIIeR43NgHeCHve 1FHppGh1NRxrppyRbBh8e94UJDNXt/wGKT0ojhLU0VkgZ33L/JcP8m3kwqppEA/VSKD3 I3WWEgMssKy3hnWLn3Xpi566AbQYpRW4fIFWA= 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=z2tdjoBzSIG68uEogbOPw0N1EDRgs0VIqX9xiBonWbA=; b=FhEynsTnIWBaGExpw+i0N2Aoxy6QKZm3IkUSwS9BKgpig1RIte1s389F9B4APxVbLF 3YMEdSGK1prXu+Nj7K3/EA6S7m2d74rkhee8tWWfJKYQGctPS87UEtS+cJWpvbazu9Ew s1AxLG9cOR3sqNCSif/T+ARA7D9ZWVueVgemSRNis2ujV33y3/hg5W0rIPMiBGKwg3uQ F2eMibxgd8JJZT+IGIF3szOkn/lN5heuMDW1MsgNrnb2Rp9xgmgrMeTBWS7vWQBBroq/ +O+bETWruK3WqgDVfGZslnb3UAZc8hbbKVnUY8HPQWJUCX938IBqYK0a1TZ9gKgatFiE UcKw== X-Gm-Message-State: AE9vXwNaYDqBjQeSbe3HNoFYYW9JsHCyHw0YbJz0P3hWUqqwjCSL6HaGEFAgAzmyf5GlUcGt X-Received: by 10.98.200.206 with SMTP id i75mr41299274pfk.172.1474919937696; Mon, 26 Sep 2016 12:58:57 -0700 (PDT) Received: from beaming.home ([67.238.99.186]) by smtp.gmail.com with ESMTPSA id m5sm33034513paw.40.2016.09.26.12.58.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Sep 2016 12:58:56 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Mon, 26 Sep 2016 22:58:54 +0300 Message-Id: <1474919934-21518-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] [fuzzy] X-Received-From: 209.85.192.178 Subject: [Qemu-devel] [PATCH] checkpatch.pl: disable arch-specific test for linux-user 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: 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 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); }