All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] checkpatch.pl: Update $logFunctions
@ 2011-07-13 16:05 Joe Perches
  2011-07-13 23:16 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2011-07-13 16:05 UTC (permalink / raw)
  To: Andrew Morton, Andy Whitcroft; +Cc: Kalle Valo, linux-kernel

Allow numbers in leading prefix.
Add logging functions with _once and _ratelimit.
Add <prefix>_printk.

Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 75d3199..6bc2caf 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -256,9 +256,9 @@ our $typeTypedefs = qr{(?x:
 )};
 
 our $logFunctions = qr{(?x:
-	printk|
-	[a-z]+_(emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)|
-	WARN|
+	printk(?:_ratelimited|_once|)|
+	[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_]+
 )};
-- 
1.7.6.131.g99019


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

* Re: [PATCH] checkpatch.pl: Update $logFunctions
  2011-07-13 16:05 [PATCH] checkpatch.pl: Update $logFunctions Joe Perches
@ 2011-07-13 23:16 ` Andrew Morton
  2011-07-13 23:41   ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2011-07-13 23:16 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andy Whitcroft, Kalle Valo, linux-kernel

On Wed, 13 Jul 2011 09:05:47 -0700
Joe Perches <joe@perches.com> wrote:

> Allow numbers in leading prefix.
> Add logging functions with _once and _ratelimit.
> Add <prefix>_printk.
> 

I look at this description wondering "hm, what does this do to
checkpatch behaviour" and realize I have not a clue.

Oh well, I'll trust you ;)


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

* Re: [PATCH] checkpatch.pl: Update $logFunctions
  2011-07-13 23:16 ` Andrew Morton
@ 2011-07-13 23:41   ` Joe Perches
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2011-07-13 23:41 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Andy Whitcroft, Kalle Valo, linux-kernel

On Wed, 2011-07-13 at 16:16 -0700, Andrew Morton wrote:
> On Wed, 13 Jul 2011 09:05:47 -0700
> Joe Perches <joe@perches.com> wrote:
> > Allow numbers in leading prefix.
> > Add logging functions with _once and _ratelimit.
> > Add <prefix>_printk.
> I look at this description wondering "hm, what does this do to
> checkpatch behaviour" and realize I have not a clue.
> Oh well, I'll trust you ;)

Not necessarily a good plan...

Perhaps this description instead:

[PATCH] checkpatch.pl: Allow more printk types (<prefix>_<level>) to be > 80 cols

Previous behavior allowed only alphabetic prefixes
like pr_info to exceed the 80 column line length limit.

ath6kl wants to add a digit into the prefix, so allow
numbers as well as digits in the <prefix>_<level> printks.

<prefix>_<level>_ratelimited and <prefix>_<level>_once
and WARN_RATELIMIT and WARN_ONCE may now exceed 80 cols.

Add missing <prefix>_printk type for completeness.


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

end of thread, other threads:[~2011-07-13 23:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-13 16:05 [PATCH] checkpatch.pl: Update $logFunctions Joe Perches
2011-07-13 23:16 ` Andrew Morton
2011-07-13 23:41   ` 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.