]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - scripts/checkpatch.pl
ASoC: tlv320aic31xx: Add overflow detection support
[linux.git] / scripts / checkpatch.pl
index 5971b0c1161630c0d792a856d34a57c59f7e30ab..5219280bf7ff351a742db19e6a35748f77efbeb8 100755 (executable)
@@ -2251,6 +2251,7 @@ sub process {
        my $author = '';
        my $authorsignoff = 0;
        my $is_patch = 0;
+       my $is_binding_patch = -1;
        my $in_header_lines = $file ? 0 : 1;
        my $in_commit_log = 0;          #Scanning lines before patch
        my $has_commit_log = 0;         #Encountered lines before patch
@@ -2501,6 +2502,19 @@ sub process {
                                $check = $check_orig;
                        }
                        $checklicenseline = 1;
+
+                       if ($realfile !~ /^MAINTAINERS/) {
+                               my $last_binding_patch = $is_binding_patch;
+
+                               $is_binding_patch = () = $realfile =~ m@^(?:Documentation/devicetree/|include/dt-bindings/)@;
+
+                               if (($last_binding_patch != -1) &&
+                                   ($last_binding_patch ^ $is_binding_patch)) {
+                                       WARN("DT_SPLIT_BINDING_PATCH",
+                                            "DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.txt\n");
+                               }
+                       }
+
                        next;
                }