checkpatch: check compatible strings in .c and .h too
Look for ".compatible = "foo" strings not only in .dts files, but in .c and .h too. Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> Cc: Joe Perches <joe@perches.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4fbf32a693
commit
7dd05b38e5
1 changed files with 4 additions and 2 deletions
|
@ -2074,8 +2074,10 @@ sub process {
|
|||
}
|
||||
|
||||
# check for DT compatible documentation
|
||||
if (defined $root && $realfile =~ /\.dts/ &&
|
||||
$rawline =~ /^\+\s*compatible\s*=/) {
|
||||
if (defined $root &&
|
||||
(($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
|
||||
($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
|
||||
|
||||
my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g;
|
||||
|
||||
foreach my $compat (@compats) {
|
||||
|
|
Loading…
Reference in a new issue