From: Mauro Carvalho Chehab Date: Wed, 29 May 2019 23:09:29 +0000 (-0300) Subject: scripts/documentation-file-ref-check: improve tools ref handling X-Git-Tag: v5.4-rc1~151^2~177 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4904aeed9f686c90dba72980f0067ac1a7dbbfb6;p=platform%2Fkernel%2Flinux-rpi.git scripts/documentation-file-ref-check: improve tools ref handling There's a false positive on perf/util: tools/perf/util/s390-cpumsf.c: Documentation/perf.data-file-format.txt The file is there at tools/perf/Documentation/, but the logic with detects relative documentation references inside tools is not capable of detecting it. So, improve it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet --- diff --git a/scripts/documentation-file-ref-check b/scripts/documentation-file-ref-check index 0523577..5d775ca 100755 --- a/scripts/documentation-file-ref-check +++ b/scripts/documentation-file-ref-check @@ -127,7 +127,7 @@ while () { if ($f =~ m/tools/) { my $path = $f; $path =~ s,(.*)/.*,$1,; - next if (grep -e, glob("$path/$ref $path/$fulref")); + next if (grep -e, glob("$path/$ref $path/../$ref $path/$fulref")); } # Discard known false-positives