]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
checkpatch: really skip LONG_LINE_* when LONG_LINE is ignored
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Mon, 10 Jun 2024 15:02:09 +0000 (17:02 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 25 Jun 2024 05:25:09 +0000 (22:25 -0700)
For a printout to happen, all types must be set to "show".  So, AND is
needed for the flags, not OR, if we want to ignore something.

Link: https://lkml.kernel.org/r/20240610150420.2279-2-wsa+renesas@sang-engineering.com
Fixes: 47e0c88b37a5 ("checkpatch: categorize some long line length checks")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/checkpatch.pl

index 2b812210b412bb115d30152c289fd7e09bc0bfd2..375749e0a174325e96d9327a1d0ed2f4be179fd2 100755 (executable)
@@ -3858,7 +3858,7 @@ sub process {
                        }
 
                        if ($msg_type ne "" &&
-                           (show_type("LONG_LINE") || show_type($msg_type))) {
+                           show_type("LONG_LINE") && show_type($msg_type)) {
                                my $msg_level = \&WARN;
                                $msg_level = \&CHK if ($file);
                                &{$msg_level}($msg_type,