From: Andy Whitcroft Date: Thu, 16 Oct 2008 05:02:18 +0000 (-0700) Subject: checkpatch: complex macros -- fix up extension handling X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=636d140a80912693be466e8d978e658189972989;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git checkpatch: complex macros -- fix up extension handling Only pull in new extension lines where the current contents ends with a \. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 303c3634198b..586f9a4f0ad0 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1977,8 +1977,8 @@ sub process { # Extract the remainder of the define (if any) and # rip off surrounding spaces, and trailing \'s. $rest = ''; - while ($off != 0 || ($cnt > 0 && $rest =~ /(?:^|\\)\s*$/)) { - #print "ADDING $off <" . substr($lines[$ln - 1], $off) . ">\n"; + while ($off != 0 || ($cnt > 0 && $rest =~ /\\\s*$/)) { + #print "ADDING cnt<$cnt> $off <" . substr($lines[$ln - 1], $off) . "> rest<$rest>\n"; if ($off != 0 || $lines[$ln - 1] !~ /^-/) { $rest .= substr($lines[$ln - 1], $off) . "\n"; $cnt--;