From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iN8kp-0002C6-1H for linux-um@lists.infradead.org; Wed, 23 Oct 2019 05:00:21 +0000 Received: by mail-pg1-x542.google.com with SMTP id c8so6569214pgb.2 for ; Tue, 22 Oct 2019 22:00:14 -0700 (PDT) From: Hajime Tazaki Subject: [RFC PATCH 36/47] checkpatch: avoid showing BIT_ULL warnings for tools/ files Date: Wed, 23 Oct 2019 13:38:10 +0900 Message-Id: <02ea17cd16cbc76c2e025ff7964ff0321bcd121f.1571798507.git.thehajime@gmail.com> In-Reply-To: References: MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: linux-um@lists.infradead.org Cc: Octavian Purdila , Akira Moroo From: Octavian Purdila Directly using shift operations in userspace compiled code should not trigger warnings as BIT_ULL macros are not available outside the kernel. Signed-off-by: Octavian Purdila --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 93a7edfe0f05..e739f565497e 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -6313,7 +6313,8 @@ sub process { $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", + if ($realfile !~ m@\btools/@ && + CHK("BIT_MACRO", "Prefer using the BIT$ull macro\n" . $herecurr) && $fix) { $fixed[$fixlinenr] =~ s/\(?\s*1\s*[ulUL]*\s*<<\s*(\d+|$Ident)\s*\)?/BIT${ull}($1)/; -- 2.20.1 (Apple Git-117) _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um