From: Minchan Kim <minchan.kim@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Minchan Kim <minchan.kim@gmail.com>,
kosaki.motohiro@jp.fujitsu.com, randy.dunlap@oracle.com,
cl@linux-foundation.org, linux-mm@kvack.org, pavel@ucw.cz,
dave@linux.vnet.ibm.com, davem@davemloft.net,
linux@dominikbrodowski.net, mingo@elte.hu,
linux-kernel@vger.kernel.org
Subject: [PATCH][mmtom] clean up printk_once of get_cpu_vendor
Date: Wed, 27 May 2009 08:31:31 +0900 [thread overview]
Message-ID: <20090527083131.7e2d161d.minchan.kim@barrios-desktop> (raw)
In-Reply-To: <20090526134134.bb3e1e23.akpm@linux-foundation.org>
On Tue, 26 May 2009 13:41:34 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Tue, 26 May 2009 15:59:43 +0900
> Minchan Kim <minchan.kim@gmail.com> wrote:
>
> > On Tue, 26 May 2009 15:52:32 +0900 (JST)
> > KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> >
> > > > == CUT HERE ==
> > > >
> > > > There are some places to be able to use printk_once instead of hard coding.
> > > >
> > > > It will help code readability and maintenance.
> > > > This patch doesn't change function's behavior.
> > > >
> > > > Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
> > > > CC: Dominik Brodowski <linux@dominikbrodowski.net>
> > > > CC: David S. Miller <davem@davemloft.net>
> > > > CC: Ingo Molnar <mingo@elte.hu>
> > > > ---
> > > > arch/x86/kernel/cpu/common.c | 8 ++------
> > > > drivers/net/3c515.c | 7 ++-----
> > > > drivers/pcmcia/pcmcia_ioctl.c | 9 +++------
> > > > 3 files changed, 7 insertions(+), 17 deletions(-)
> > >
> > > Please separete to three patches ;)
> >
> > After I listen about things I missed, I will repost it at all once with each patch.
>
> Yes, that would be better. But for a trivial little patch like this I
> expect we can just merge it and move on. But please do split up these
> multi-subsystem patches in future.
Thanks. Andrew.
I confiremd what you merged.
I modifed get_cpu_vendor's printk-once by Pavel Machek's adivse.
Please, merge with this based on my previous version.
== CUT HERE ==
[PATCH] clean up printk_once of get_cpu_vendor
It remove unnecessary variable and change two static variable
with one.
Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
CC: Ingo Molnar <mingo@elte.hu>
CC: Pavel Machek <pavel@ucw.cz>
---
arch/x86/kernel/cpu/common.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index dc0f694..c6feb68 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -479,7 +479,6 @@ out:
static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
{
char *v = c->x86_vendor_id;
- static int printed;
int i;
for (i = 0; i < X86_VENDOR_NUM; i++) {
@@ -497,8 +496,8 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
}
printk_once(KERN_ERR
- "CPU: vendor_id '%s' unknown, using generic init.\n", v);
- printk_once(KERN_ERR "CPU: Your system may be unstable.\n");
+ "CPU: vendor_id '%s' unknown, using generic init.\n" \
+ "CPU: Your system may be unstable.\n", v);
c->x86_vendor = X86_VENDOR_UNKNOWN;
this_cpu = &default_cpu;
--
1.5.4.3
--
Kinds Regards
Minchan Kim
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-05-26 23:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-26 4:57 [PATCH][mmtom] clean up once printk routine Minchan Kim
2009-05-26 6:52 ` KOSAKI Motohiro
2009-05-26 6:59 ` Minchan Kim
2009-05-26 20:41 ` Andrew Morton
2009-05-26 23:31 ` Minchan Kim [this message]
2009-05-26 8:35 ` Pavel Machek
2009-05-26 9:40 ` Minchan Kim
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=20090527083131.7e2d161d.minchan.kim@barrios-desktop \
--to=minchan.kim@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=dave@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@dominikbrodowski.net \
--cc=mingo@elte.hu \
--cc=pavel@ucw.cz \
--cc=randy.dunlap@oracle.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