lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20090527083131.7e2d161d.minchan.kim@barrios-desktop>
Date:	Wed, 27 May 2009 08:31:31 +0900
From:	Minchan Kim <minchan.kim@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Minchan Kim <minchan.kim@...il.com>,
	kosaki.motohiro@...fujitsu.com, randy.dunlap@...cle.com,
	cl@...ux-foundation.org, linux-mm@...ck.org, pavel@....cz,
	dave@...ux.vnet.ibm.com, davem@...emloft.net,
	linux@...inikbrodowski.net, mingo@...e.hu,
	linux-kernel@...r.kernel.org
Subject: [PATCH][mmtom] clean up printk_once of get_cpu_vendor

On Tue, 26 May 2009 13:41:34 -0700
Andrew Morton <akpm@...ux-foundation.org> wrote:

> On Tue, 26 May 2009 15:59:43 +0900
> Minchan Kim <minchan.kim@...il.com> wrote:
> 
> > On Tue, 26 May 2009 15:52:32 +0900 (JST)
> > KOSAKI Motohiro <kosaki.motohiro@...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@...il.com>
> > > > CC: Dominik Brodowski <linux@...inikbrodowski.net>
> > > > CC: David S. Miller <davem@...emloft.net>
> > > > CC: Ingo Molnar <mingo@...e.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@...il.com>
CC: Ingo Molnar <mingo@...e.hu>
CC: Pavel Machek <pavel@....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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ