Commit 133712a2 authored by Rob Herring's avatar Rob Herring Committed by Linus Torvalds

checkpatch: DT bindings should be a separate patch

Devicetree bindings should be their own patch as documented in
Documentation/devicetree/bindings/submitting-patches.txt section I.1.
This is because bindings are logically independent from a driver
implementation, they have a different maintainer (even though they often
are applied via the same tree), and it makes for a cleaner history in the
DT only tree created with git-filter-branch.

[robh@kernel.org: add doc pointer to warning, simplify logic]
  Link: http://lkml.kernel.org/r/20180810170513.26284-1-robh@kernel.org
[robh@kernel.org: v3]
  Link: http://lkml.kernel.org/r/20180810225049.20452-1-robh@kernel.org
Link: http://lkml.kernel.org/r/20180809205032.22205-1-robh@kernel.orgSigned-off-by: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarJoe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 809e082e
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment