From: Ingo Molnar <mingo@elte.hu>
To: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andreas Herrmann <herrmann.der.user@googlemail.com>
Subject: Re: [PATCH] checkpatch.pl: Warn on pr_<level> or dev_<level> with KERN_<level>
Date: Wed, 9 Dec 2009 08:32:55 +0100 [thread overview]
Message-ID: <20091209073255.GB8187@elte.hu> (raw)
In-Reply-To: <1260341479.27677.193.camel@Joe-Laptop.home>
* Joe Perches <joe@perches.com> wrote:
> On Wed, 2009-12-09 at 07:05 +0100, Ingo Molnar wrote:
> > ( Andy: i suspect checkpatch could also grow a new warning perhaps, the
> > '\<pr_.*(KERN_.*' pattern will i suspect pinpoint something fishy in
> > most cases. )
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index bc4114f..ffd8210 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1832,6 +1832,12 @@ sub process {
> }
> }
>
> +# pr_<level> and dev_<level> should not use KERN_* levels
> +
> + if ($line =~ /\b(pr_|dev_)[a-z]+.*KERN_/) {
putting \( into the pattern would further reduce the chance of false
positives.
Ingo
prev parent reply other threads:[~2009-12-09 7:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200912082259.nB8Mx2ih008207@hera.kernel.org>
2009-12-08 23:06 ` x86: ucode-amd: Convert printk(KERN_*...) to pr_*(...) Joe Perches
2009-12-09 6:05 ` Ingo Molnar
2009-12-09 6:30 ` [PATCH] arch/x86/kernel/microcode*: Use pr_fmt and remove duplicated KERN_ERR prefix Joe Perches
2009-12-09 7:26 ` Ingo Molnar
2009-12-09 18:45 ` [PATCH 0/5] arch/x86: Add #define pr_fmt(fmt) and use pr_<level> Joe Perches
2009-12-09 18:45 ` [PATCH 1/5] es7000_32.c: use pr_<level> and add pr_fmt(fmt) Joe Perches
2009-12-10 8:42 ` [tip:x86/urgent] x86: es7000_32.c: Use " tip-bot for Joe Perches
2009-12-09 18:45 ` [PATCH 2/5] arch/x86/kernel/setup_percpu.c: use " Joe Perches
2009-12-10 8:42 ` [tip:x86/urgent] x86: setup_percpu.c: Use " tip-bot for Joe Perches
2009-12-09 18:45 ` [PATCH 3/5] i8254.c: Add pr_fmt(fmt) Joe Perches
2009-12-10 8:43 ` [tip:x86/urgent] x86: " tip-bot for Joe Perches
2009-12-09 18:45 ` [PATCH 4/5] kmmio.c: Add and use pr_fmt(fmt) Joe Perches
2009-12-10 8:43 ` [tip:x86/urgent] x86: " tip-bot for Joe Perches
2009-12-09 18:45 ` [PATCH 5/5] arch/x86/mm/mmio-mod.c: use pr_fmt Joe Perches
2009-12-10 8:43 ` [tip:x86/urgent] x86: mmio-mod.c: Use pr_fmt tip-bot for Joe Perches
2009-12-09 9:51 ` [tip:x86/urgent] arch/x86/kernel/microcode*: Use pr_fmt() and remove duplicated KERN_ERR prefix tip-bot for Joe Perches
2009-12-09 6:51 ` [PATCH] checkpatch.pl: Warn on pr_<level> or dev_<level> with KERN_<level> Joe Perches
2009-12-09 7:32 ` Ingo Molnar [this message]
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=20091209073255.GB8187@elte.hu \
--to=mingo@elte.hu \
--cc=apw@canonical.com \
--cc=herrmann.der.user@googlemail.com \
--cc=joe@perches.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®