summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2019-05-15 11:36:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-05-21 09:16:57 +0200
commit725306f01e290b0f812093fbc826e892d9ffb1c2 (patch)
tree7fe6457b6d92d4cb808f5cd7aed72ebc64ed32bc /scripts
parent9e60c153cbfb62debe307f1431be686a6fb29515 (diff)
downloadbarebox-725306f01e290b0f812093fbc826e892d9ffb1c2.tar.gz
barebox-725306f01e290b0f812093fbc826e892d9ffb1c2.tar.xz
checkpatch: apply barebox-specific modifications
For future reference, following barebox changes were applied on top of the scripts/checkpatch.pl copied from upstream: 4a7f56056d ("scripts: Adapt checkpatch.pl for barebox.") 2671c30c25 ("scripts/checkpatch.pl: don't search for Doxyfile when checking top_of_kernel_tree()") ad3c55fbf2 ("scripts/checkpatch.pl: don't search for CREDITS when checking top_of_kernel_tree()") 13b0f4666d ("checkpatch: don't check TODO file presence") These adjust sub top_of_kernel_tree's @tree_check to eventually contain ( "arch", "commands", "common", "COPYING", "defaultenv", "Documentation", "drivers", "fs", "include", "lib", "MAKEALL", "Makefile", "net", "README", "scripts" ); 9e809ef431 ("scripts: allow lines longer than 80 cols with printf() in checkpatch") adds an exception for printf, same as printk. 9496896fbf ("checkpatch: add DT compatible string documentation checks") searches dts/Bindings as well as Documentation/devicetree/bindings for compatibles. Cc: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl16
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a09333fd7c..65c2cfad45 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -457,7 +457,7 @@ our $typeTypedefs = qr{(?x:
our $zero_initializer = qr{(?:(?:0[xX])?0+$Int_type?|NULL|false)\b};
our $logFunctions = qr{(?x:
- printk(?:_ratelimited|_once|_deferred_once|_deferred|)|
+ printf|printk(?:_ratelimited|_once|_deferred_once|_deferred|)|
(?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
TP_printk|
WARN(?:_RATELIMIT|_ONCE|)|
@@ -1095,9 +1095,9 @@ sub top_of_kernel_tree {
my ($root) = @_;
my @tree_check = (
- "COPYING", "CREDITS", "Kbuild", "MAINTAINERS", "Makefile",
- "README", "Documentation", "arch", "include", "drivers",
- "fs", "init", "ipc", "kernel", "lib", "scripts",
+ "arch", "commands", "common", "COPYING", "defaultenv",
+ "Documentation", "drivers", "fs", "include", "lib",
+ "MAKEALL", "Makefile", "net", "README", "scripts"
);
foreach my $check (@tree_check) {
@@ -3008,8 +3008,12 @@ sub process {
my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g;
- my $dt_path = $root . "/Documentation/devicetree/bindings/";
- my $vp_file = $dt_path . "vendor-prefixes.txt";
+ # linux device tree files
+ my $dt_path = $root . "/dts/Bindings/";
+ my $vp_file = $dt_path . "vendor-prefixes.txt";
+
+ # barebox-specific bindings
+ $dt_path = $dt_path . " " . $root . "/Documentation/devicetree/bindings/";
foreach my $compat (@compats) {
my $compat2 = $compat;