All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch: support more uppercase $logFunctions
@ 2015-03-19  6:21 Tom Van Braeckel
  2015-03-19  8:26 ` [PATCH v2] " Tom Van Braeckel
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Van Braeckel @ 2015-03-19  6:21 UTC (permalink / raw)
  To: apw, joe; +Cc: linux-kernel

Add support for uppercase logging function names (so that they may
exceed 80 cols) and regroup the matched expressions more logically.

Previously, WARN, WARN_RATELIMIT, WARN_ONCE were already supported but
many other uppercase logging functions were not and this caused
unfixable checkpatch warnings (an example: drivers/bluetooth/btusb.c)

Care was taken to avoid being overly broad by adding uppercase logging
functions that do not exist (such as VDBG) or by making everything case
insensitive.

Care was also taken to make sure that previously supported expressions
are still matched (such as WARN*) unless they do not exist anywhere in
the codebase (such as WARN_once or WARN_ratelimited).

Signed-off-by: Tom Van Braeckel <tomvanbraeckel@gmail.com>
---
 scripts/checkpatch.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d124359..c5d1388 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -351,8 +351,8 @@ our $typeTypedefs = qr{(?x:
 
 our $logFunctions = qr{(?x:
 	printk(?:_ratelimited|_once|)|
-	(?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
-	WARN(?:_RATELIMIT|_ONCE|)|
+	(?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont)(?:_ratelimited|_once|)|
+	(?:[A-Z0-9]+_){1,2}(?:EMERG|ALERT|CRIT|ERR|WARNING|WARN|NOTICE|INFO|DEBUG|DBG|DEVEL)(?:_RATELIMIT|_ONCE|)|
 	panic|
 	MODULE_[A-Z_]+|
 	seq_vprintf|seq_printf|seq_puts
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-19 15:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-19  6:21 [PATCH] checkpatch: support more uppercase $logFunctions Tom Van Braeckel
2015-03-19  8:26 ` [PATCH v2] " Tom Van Braeckel
2015-03-19  9:13   ` Joe Perches
2015-03-19  9:57     ` Tom Van Braeckel
2015-03-19 15:02       ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.