xen/console: Update console event channel on resume
[firefly-linux-kernel-4.4.55.git] / scripts / checkpatch.pl
index 28516587babac8fbc9eb346f0a44b1aba9c39a8e..89b1df4e72ab3423bce45011fb03f86c193f5ad4 100755 (executable)
@@ -1690,7 +1690,7 @@ sub fix_inserted_deleted_lines {
        foreach my $old_line (@{$linesRef}) {
                my $save_line = 1;
                my $line = $old_line;   #don't modify the array
-               if ($line =~ /^(?:\+\+\+\|\-\-\-)\s+\S+/) {     #new filename
+               if ($line =~ /^(?:\+\+\+|\-\-\-)\s+\S+/) {      #new filename
                        $delta_offset = 0;
                } elsif ($line =~ /^\@\@ -\d+,\d+ \+\d+,\d+ \@\@/) {    #new hunk
                        $range_last_linenr = $new_linenr;
@@ -3396,6 +3396,14 @@ sub process {
                             "Prefer dev_$level(... to dev_printk(KERN_$orig, ...\n" . $herecurr);
                }
 
+# ENOSYS means "bad syscall nr" and nothing else.  This will have a small
+# number of false positives, but assembly files are not checked, so at
+# least the arch entry code will not trigger this warning.
+               if ($line =~ /\bENOSYS\b/) {
+                       WARN("ENOSYS",
+                            "ENOSYS means 'invalid syscall nr' and nothing else\n" . $herecurr);
+               }
+
 # function brace can't be on same line, except for #defines of do while,
 # or if closed on same line
                if (($line=~/$Type\s*$Ident\(.*\).*\s*{/) and
@@ -3837,6 +3845,14 @@ sub process {
                                                $ok = 1;
                                        }
 
+                                       # for asm volatile statements
+                                       # ignore a colon with another
+                                       # colon immediately before or after
+                                       if (($op eq ':') &&
+                                           ($ca =~ /:$/ || $cc =~ /^:/)) {
+                                               $ok = 1;
+                                       }
+
                                        # messages are ERROR, but ?: are CHK
                                        if ($ok == 0) {
                                                my $msg_type = \&ERROR;