From: Joe Perches <joe@perches.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: "Víctor Manuel Jáquez Leal" <vjaquez@igalia.com>,
"Tony Lindgren" <tony@atomide.com>,
linux-kernel@vger.kernel.org,
"Timo Teras" <timo.teras@solidboot.com>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3] omap: dmtimer: convert printk to pr_err
Date: Fri, 07 Oct 2011 10:40:39 -0700 [thread overview]
Message-ID: <1318009239.1644.38.camel@Joe-Laptop> (raw)
In-Reply-To: <20111007092243.GC27281@n2100.arm.linux.org.uk>
On Fri, 2011-10-07 at 10:22 +0100, Russell King - ARM Linux wrote:
> On Fri, Oct 07, 2011 at 10:50:16AM +0200, Víctor Manuel Jáquez Leal wrote:
> > Convert a printk(KERN_ERR) message in the driver to pr_err().
> ...
> > @@ -111,7 +111,7 @@ static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer)
> > while (!(__raw_readl(timer->sys_stat) & 1)) {
> > c++;
> > if (c > 100000) {
> > - printk(KERN_ERR "Timer failed to reset\n");
> > + pr_err("Timer failed to reset\n");
>
> What is the reason behind this change? It looks like it's to use the
> latest and greatest function.
Hi Russell
I'm not promoting this patch, just commenting.
At some point in the next couple of years, I want
to convert all of, or as many as possible of, the
remaining printk uses to pr_<level>.
This would allow finer grained control over the
prefixing of KBUILD_MODNAME and __func__, and
could possibly make the kernel image smaller.
Today, arch/arm has ~3:1 ratio of printk to pr_<level>.
grep shows 1427 printks, 468 pr_<level>, 405 pr_debug's.
> If so, please don't make these changes - we have on many occasions been
> blamed for size of diffstat, churn, needless change, and this patch is
> exactly that.
True.
These trivial changes could wait until arch/arm settles
down a bit more.
> By all means fix printk's without KERN_ constants,
There's still more than 250 of those in arch/arm.
Even more with the uses of secondary things like:
#define PRINTK(x...) (foo && printk(x))
> possibly converting
> them to pr_*, but don't go around replacing printk(KERN_* with pr_*(
> without ensuring that there's a real benefit to the change.
Style consistency patches do need to be governed by
acceptable churn rate.
next prev parent reply other threads:[~2011-10-07 17:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-06 10:48 [PATCH] omap: dmtimer: convert printk to pr_* Víctor Manuel Jáquez Leal
2011-10-06 15:19 ` Joe Perches
2011-10-06 16:26 ` Víctor M. Jáquez L.
2011-10-06 17:30 ` [PATCH v2] omap: dmtimer: convert printk to pr_err / WARN Víctor Manuel Jáquez Leal
2011-10-06 20:18 ` Tony Lindgren
2011-10-07 8:50 ` [PATCH v3] omap: dmtimer: convert printk to pr_err Víctor Manuel Jáquez Leal
2011-10-07 9:22 ` Russell King - ARM Linux
2011-10-07 10:46 ` Víctor M. Jáquez L.
2011-10-07 17:40 ` Joe Perches [this message]
2011-10-07 19:18 ` Russell King - ARM Linux
2011-10-07 19:48 ` Joe Perches
2011-10-07 19:57 ` Russell King - ARM Linux
2011-10-07 20:02 ` Joe Perches
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=1318009239.1644.38.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=timo.teras@solidboot.com \
--cc=tony@atomide.com \
--cc=vjaquez@igalia.com \
/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