From: Joe Perches <joe@perches.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] checkpatch: allow uppercase logging function names
Date: Thu, 04 Dec 2014 02:47:25 +0000 [thread overview]
Message-ID: <1417661245.2902.31.camel@perches.com> (raw)
In-Reply-To: <1417660721-13330-1-git-send-email-wwiser@gmail.com>
On Wed, 2014-12-03 at 21:38 -0500, Wesley Wiser wrote:
> Some kernel logging functions are prefixed with uppercase letters such
> as TP_printk, DUMP_printk, DBG_printk, DEBC_printk, etc. The previous
> behavior only allowed logging functions (which may exceed the 80
> character line limit) to be prefixed by lowercase letters and numbers.
I'm not sure that these should be encouraged.
I'd prefer to make these lower case instead.
The regex also allows mixed case like Tp_printk.
Maybe if it was something like
(?:[a-z0-9]+_|[A-Z0-9]+_){1,2}
but it still seems undesirable.
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 374abf4..3b08f1e 100755
> ---
> +++ b/scripts/checkpatch.pl
> @@ -343,7 +343,7 @@ 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|)|
> + (?:[a-zA-Z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
> WARN(?:_RATELIMIT|_ONCE|)|
> panic|
> MODULE_[A-Z_]+|
next prev parent reply other threads:[~2014-12-04 2:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 2:38 [PATCH] checkpatch: allow uppercase logging function names Wesley Wiser
2014-12-04 2:47 ` Joe Perches [this message]
2014-12-04 8:54 ` Dan Carpenter
2014-12-06 3:28 ` Wesley Wiser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1417661245.2902.31.camel@perches.com \
--to=joe@perches.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox