Skip to contentSkip to conversation

checkpatch: allow DEFINE_PER_CPU definitions to exceed line length

PATCH New [email protected] 1 participant 1 message Nov 17, 2017 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 43/94 checkpatch: allow DEFINE_PER_CPU definitions to exceed line length

From: Joe Perches <[email protected]>
Subject: checkpatch: allow DEFINE_PER_CPU definitions to exceed line length

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.

See 25528213fe9f75f4 ("tags: Fix DEFINE_PER_CPU expansions") for more details.

---

 scripts/checkpatch.pl |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
scripts/checkpatch.pl renamed from scripts/checkpatch.pl~checkpatch-allow-define_per_cpu-definitions-to-exceed-line-length +3 -2
diff -puN scripts/checkpatch.pl~checkpatch-allow-define_per_cpu-definitions-to-exceed-line-length 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

_