checkpatch: correct false positives reporting instructions
[fw/openocd] / tools / scripts / checkpatch.pl
index edbd464b2622514aed53bb462248a133215454df..aa3e63743a39bff5d459906b3ff2773e42a933b9 100755 (executable)
@@ -597,6 +597,7 @@ our $typeTypedefs = qr{(?x:
 
 our $zero_initializer = qr{(?:(?:0[xX])?0+$Int_type?|NULL|false)\b};
 
+if (!$OpenOCD) {
 our $logFunctions = qr{(?x:
        printk(?:_ratelimited|_once|_deferred_once|_deferred|)|
        (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
@@ -606,6 +607,12 @@ our $logFunctions = qr{(?x:
        MODULE_[A-Z_]+|
        seq_vprintf|seq_printf|seq_puts
 )};
+} # !$OpenOCD
+# OpenOCD specific: Begin: list log functions
+our $logFunctions = qr{(?x:
+       LOG_(?:TARGET_|)(?:DEBUG_IO|DEBUG|INFO|WARNING|ERROR|USER|USER_N|OUTPUT)
+)};
+# OpenOCD specific: End
 
 our $allocFunctions = qr{(?x:
        (?:(?:devm_)?
@@ -1335,11 +1342,21 @@ NOTE: perl $^V is not modern enough to detect all possible issues.
 EOM
        }
        if ($exit) {
+               if (!$OpenOCD) {
                print << "EOM"
 
 NOTE: If any of the errors are false positives, please report
       them to the maintainer, see CHECKPATCH in MAINTAINERS.
 EOM
+               } # !$OpenOCD
+               # OpenOCD specific: Begin
+               print << "EOM"
+
+NOTE: If any of the errors are false positives, please report
+      them to the openocd-devel mailing list or prepare a patch
+      and send it to Gerrit for review.
+EOM
+               # OpenOCD specific: End
        }
 }
 
@@ -1396,6 +1413,10 @@ sub parse_email {
                        $address = "";
                        $comment = "";
                }
+       # OpenOCD specific: Begin: handle jenkins as valid email
+       } elsif ($formatted_email eq "jenkins") {
+                       $address = "jenkins";
+       # OpenOCD specific: End
        }
 
        # Extract comments from names excluding quoted parts