diff options
author | Minchan Kim <minchan.kim@gmail.com> | 2009-06-16 18:33:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 22:47:50 -0400 |
commit | a9c569539312cfd3c820b38036679a9d72c55331 (patch) | |
tree | c607645c5392febc6b35e127e6906547d02d2c61 | |
parent | 009789f040b71699278e70a6664701c10065e430 (diff) |
use printk_once() in several places
There are some places to be able to use printk_once instead of hard coding.
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>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 11 | ||||
-rw-r--r-- | drivers/pcmcia/pcmcia_ioctl.c | 9 |
2 files changed, 6 insertions, 14 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 3ffdcfa9abdf..9fa33886c0d7 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -487,7 +487,6 @@ out: | |||
487 | static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) | 487 | static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) |
488 | { | 488 | { |
489 | char *v = c->x86_vendor_id; | 489 | char *v = c->x86_vendor_id; |
490 | static int printed; | ||
491 | int i; | 490 | int i; |
492 | 491 | ||
493 | for (i = 0; i < X86_VENDOR_NUM; i++) { | 492 | for (i = 0; i < X86_VENDOR_NUM; i++) { |
@@ -504,13 +503,9 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c) | |||
504 | } | 503 | } |
505 | } | 504 | } |
506 | 505 | ||
507 | if (!printed) { | 506 | printk_once(KERN_ERR |
508 | printed++; | 507 | "CPU: vendor_id '%s' unknown, using generic init.\n" \ |
509 | printk(KERN_ERR | 508 | "CPU: Your system may be unstable.\n", v); |
510 | "CPU: vendor_id '%s' unknown, using generic init.\n", v); | ||
511 | |||
512 | printk(KERN_ERR "CPU: Your system may be unstable.\n"); | ||
513 | } | ||
514 | 509 | ||
515 | c->x86_vendor = X86_VENDOR_UNKNOWN; | 510 | c->x86_vendor = X86_VENDOR_UNKNOWN; |
516 | this_cpu = &default_cpu; | 511 | this_cpu = &default_cpu; |
diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c index 1703b20cad5d..6095f8daecd7 100644 --- a/drivers/pcmcia/pcmcia_ioctl.c +++ b/drivers/pcmcia/pcmcia_ioctl.c | |||
@@ -915,12 +915,9 @@ static int ds_ioctl(struct inode * inode, struct file * file, | |||
915 | err = -EPERM; | 915 | err = -EPERM; |
916 | goto free_out; | 916 | goto free_out; |
917 | } else { | 917 | } else { |
918 | static int printed = 0; | 918 | printk_once(KERN_WARNING |
919 | if (!printed) { | 919 | "2.6. kernels use pcmciamtd instead of memory_cs.c and do not require special\n"); |
920 | printk(KERN_WARNING "2.6. kernels use pcmciamtd instead of memory_cs.c and do not require special\n"); | 920 | printk_once(KERN_WARNING "MTD handling any more.\n"); |
921 | printk(KERN_WARNING "MTD handling any more.\n"); | ||
922 | printed++; | ||
923 | } | ||
924 | } | 921 | } |
925 | err = -EINVAL; | 922 | err = -EINVAL; |
926 | goto free_out; | 923 | goto free_out; |