From: Linus Torvalds <torvalds@linux-foundation.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: linux-kernel@vger.kernel.org,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
kernel@pengutronix.de, Arjan van de Ven <arjan@infradead.org>,
linux-mm@kvack.org
Subject: Re: [PATCH 5/6] mm: add some KERN_CONT markers to continuation lines
Date: Tue, 1 Mar 2011 13:46:52 -0800 [thread overview]
Message-ID: <AANLkTi=VB5po9Yt2oCcCq01UNQxXNY+_6RBpjWRFkvxN@mail.gmail.com> (raw)
In-Reply-To: <20110228151736.GO22310@pengutronix.de>
2011/2/28 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
> Hello,
>
>
> On Wed, Nov 24, 2010 at 09:57:49AM +0100, Uwe Kleine-König wrote:
>> - printk("\n");
>> - printk("%spcpu-alloc: ", lvl);
>> + printk(KERN_CONT "\n");
>> + printk("%spcpu-alloc:", lvl);
So I hate this kind of "mindless search-and-replace" patch.
The whole point is that with the modern printk semantics, the above
kind of crazy cdoe shouldn't be needed. You should be able to just
write
printk("%spcpu-alloc:", lvl);
without that "\n" at all, because printk() will insert the \n if
necessary. So the concept of
printk(KERN_CONT "\n")
is just crazy: you're saying "I want to continue the line, in order to
print a newline". Whaa?
>> - printk("[%0*d] ", group_width, group);
>> + printk(KERN_CONT " [%0*d]", group_width, group);
>> - printk("%0*d ", cpu_width,
>> + printk(KERN_CONT " %0*d", cpu_width,
>> - printk("%s ", empty_str);
>> + printk(KERN_CONT " %s", empty_str);
These look ok, but:
>> - printk("\n");
>> + printk(KERN_CONT "\n");
Same deal. Why do KERN_CONT + "\n"?
Yes, yes, it does have semantic meaning ("do newline _now_"), and can
matter if you are going to use KERN_CONT exclusively around it. But it
still smells like just being silly to me. The point of the printk
changes was to make things simpler. I really would suggest just
removing those KERN_CONT "\n" lines. Doesn't it end up looking fine
that way too?
Linus
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-03-01 21:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20101124085645.GW4693@pengutronix.de>
2010-11-24 8:57 ` Uwe Kleine-König
2011-02-28 15:17 ` Uwe Kleine-König
2011-03-01 21:46 ` Linus Torvalds [this message]
2011-03-02 5:28 ` 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='AANLkTi=VB5po9Yt2oCcCq01UNQxXNY+_6RBpjWRFkvxN@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@arm.linux.org.uk \
--cc=u.kleine-koenig@pengutronix.de \
/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