From bb3cd6ec438de16295152c64592408685ef9451f Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Mon, 14 Oct 2013 10:03:00 +0400 Subject: [PATCH] checkpatch: add logging functions It's commonly considered that user-visible strings should not be split to different lines in the sources to ease grepping for them. Hence, checkpatch traditionally makes an exception for logging functions, lines having them can be of arbitrary length. OpenOCD uses different (from Linux, the kernel) names, so they need to be added to avoid false positives. Change-Id: I1198c1ffc62b5403d97efa41e665c81a5b6bb3a3 Signed-off-by: Paul Fertser Reviewed-on: http://openocd.zylin.com/1696 Tested-by: jenkins Reviewed-by: Spencer Oliver --- tools/scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/scripts/checkpatch.pl b/tools/scripts/checkpatch.pl index a9c8e39b50..eec68b7a0d 100755 --- a/tools/scripts/checkpatch.pl +++ b/tools/scripts/checkpatch.pl @@ -261,7 +261,8 @@ our $logFunctions = qr{(?x: [a-z0-9]+_(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)| WARN(?:_RATELIMIT|_ONCE|)| panic| - MODULE_[A-Z_]+ + MODULE_[A-Z_]+| + LOG_(?:DEBUG|INFO|WARNING|ERROR|USER|USER_N|OUTPUT)+ )}; our $signature_tags = qr{(?xi: -- 2.30.2