From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932812AbdKCTIV (ORCPT ); Fri, 3 Nov 2017 15:08:21 -0400 Received: from out0-211.mail.aliyun.com ([140.205.0.211]:44066 "EHLO out0-211.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415AbdKCTIT (ORCPT ); Fri, 3 Nov 2017 15:08:19 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R681e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03310;MF=yang.s@alibaba-inc.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---.9JVLo-C_1509736086; From: "Yang Shi" To: apw@canonical.com, joe@perches.com Cc: , "Yang Shi" , Subject: [RFC PATCH] scripts: checkpatch.pl: remove obsolete in_atomic rule Date: Sat, 04 Nov 2017 03:08:06 +0800 Message-Id: <1509736086-408-1-git-send-email-yang.s@alibaba-inc.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org checkpatch.pl still reports the below in_atomic warning: WARNING: use of in_atomic() is incorrect outside core kernel code + if (in_atomic()) But, in_atomic() has been used outside kernel dir for a long time, and even drivers. So, remove the obsolete rule even though they can be ignored. Signed-off-by: Yang Shi CC: Andrew Morton --- Not sure if removing the obsolete rule is preferred by checkpatch.pl, anyway it sounds not make sense to keep invalid rule. scripts/checkpatch.pl | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8b80bac..e8cf94f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -6231,17 +6231,6 @@ sub process { "Using $1 should generally have parentheses around the comparison\n" . $herecurr); } -# whine mightly about in_atomic - if ($line =~ /\bin_atomic\s*\(/) { - if ($realfile =~ m@^drivers/@) { - ERROR("IN_ATOMIC", - "do not use in_atomic in drivers\n" . $herecurr); - } elsif ($realfile !~ m@^kernel/@) { - WARN("IN_ATOMIC", - "use of in_atomic() is incorrect outside core kernel code\n" . $herecurr); - } - } - # whine about ACCESS_ONCE if ($^V && $^V ge 5.10.0 && $line =~ /\bACCESS_ONCE\s*$balanced_parens\s*(=(?!=))?\s*($FuncArg)?/) { -- 1.8.3.1