Thread (6 messages) 6 messages, 3 authors, 2017-10-17
STALE3195d

[PATCH] checkpatch: Allow DEFINE_PER_CPU definitions to exceed line length

From: joe@perches.com (Joe Perches)
Date: 2017-10-16 16:12:07
Also in: lkml
Subsystem: checkpatch, the rest · Maintainers: Andy Whitcroft, Joe Perches, Linus Torvalds

Some of the definitions are very long and can't be split
into multiple lines because ctags is limited.

Exempt these lines from the line length checks.

Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2a8c6c3c1bdb..5fa0f5467d99 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2900,8 +2900,9 @@ sub process {
 				 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
 				$msg_type = "";
 
-			# EFI_GUID is another special case
-			} elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/) {
+			# More special cases
+			} elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/ ||
+				 $line =~ /^\+\s*(?:\w+)?\s*DEFINE_PER_CPU/) {
 				$msg_type = "";
 
 			# Otherwise set the alternate message types
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help