From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751894AbcGPWKF (ORCPT ); Sat, 16 Jul 2016 18:10:05 -0400 Received: from mga14.intel.com ([192.55.52.115]:7028 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524AbcGPWKC (ORCPT ); Sat, 16 Jul 2016 18:10:02 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,375,1464678000"; d="scan'208";a="1008202183" From: Tomas Winkler To: Andy Whitcroft , Joe Perches Cc: linux-kernel@vger.kernel.org, Tomas Winkler Subject: [PATCH v2] checkpatch: don't complain about BIT macro in uapi Date: Sun, 17 Jul 2016 01:10:33 +0300 Message-Id: <1468707033-16173-1-git-send-email-tomas.winkler@intel.com> X-Mailer: git-send-email 2.5.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org BIT macro cannot be exported to UAPI, don't complain about it Signed-off-by: Tomas Winkler --- V2: fix indentation scripts/checkpatch.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a0e511206f24..76d3fccb82f3 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5733,8 +5733,9 @@ sub process { } } -# check for #defines like: 1 << that could be BIT(digit) - if ($line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) { +# check for #defines like: 1 << that could be BIT(digit), it is not exported to uapi + if ($realfile !~ m@^include/uapi/@ && + $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) { my $ull = ""; $ull = "_ULL" if (defined($1) && $1 =~ /ll/i); if (CHK("BIT_MACRO", -- 2.5.5