2008-12-05 11:42:33

by Michael Tokarev

[permalink] [raw]
Subject: [trivial] fix missing space in printk

Just come across this when booting on an old hw..
Looks somewhat ugly, that single missing space ;)

And oh,

Signed-Off-By: Michael Tokarev <[email protected]>

;)

/mjt


Attachments:
notlistedbythebios.diff (515.00 B)

2008-12-05 12:11:19

by Ingo Molnar

[permalink] [raw]
Subject: Re: [trivial] fix missing space in printk


* Michael Tokarev <[email protected]> wrote:

> Just come across this when booting on an old hw.. Looks somewhat ugly,
> that single missing space ;)
>
> And oh,
>
> Signed-Off-By: Michael Tokarev <[email protected]>
>
> ;)

applied to tip/x86/cleanups.

> --- a/arch/x86/kernel/smpboot.c 2008-10-10 02:13:53.000000000 +0400
> +++ b/arch/x86/kernel/smpboot.c 2008-12-05 14:39:29.608353301 +0300
> @@ -1084,7 +1084,7 @@ static int __init smp_sanity_check(unsig
> #endif
>
> if (!physid_isset(hard_smp_processor_id(), phys_cpu_present_map)) {
> - printk(KERN_WARNING "weird, boot CPU (#%d) not listed"
> + printk(KERN_WARNING "weird, boot CPU (#%d) not listed "
> "by the BIOS.\n", hard_smp_processor_id());

btw., the reason for that bug was the incorrect line break in the middle
of a string - we humans just dont notice a missing space in that context.

So in the final commit i've moved the string to a single line, see it
attached below.

Ingo

--------------->
>From 55c395b47042e12d5c25aa07f271f56ffe44f793 Mon Sep 17 00:00:00 2001
From: Michael Tokarev <[email protected]>
Date: Fri, 5 Dec 2008 14:42:20 +0300
Subject: [PATCH] x86: fix missing space in printk

Just come across this when booting on an old hw..
Looks somewhat ugly, that single missing space ;)

Signed-off-by: Michael Tokarev <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/kernel/smpboot.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 7b10933..1a3c325 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1086,8 +1086,10 @@ static int __init smp_sanity_check(unsigned max_cpus)
#endif

if (!physid_isset(hard_smp_processor_id(), phys_cpu_present_map)) {
- printk(KERN_WARNING "weird, boot CPU (#%d) not listed"
- "by the BIOS.\n", hard_smp_processor_id());
+ printk(KERN_WARNING
+ "weird, boot CPU (#%d) not listed by the BIOS.\n",
+ hard_smp_processor_id());
+
physid_set(hard_smp_processor_id(), phys_cpu_present_map);
}

2008-12-05 12:47:44

by Michael Tokarev

[permalink] [raw]
Subject: Re: [trivial] fix missing space in printk

Ingo Molnar wrote:
> * Michael Tokarev <[email protected]> wrote:
>
>> Just come across this when booting on an old hw.. Looks somewhat ugly,
>> that single missing space ;)
>>
>> And oh,
>>
>> Signed-Off-By: Michael Tokarev <[email protected]>
>>
>> ;)
>
> applied to tip/x86/cleanups.
>
>> --- a/arch/x86/kernel/smpboot.c 2008-10-10 02:13:53.000000000 +0400
>> +++ b/arch/x86/kernel/smpboot.c 2008-12-05 14:39:29.608353301 +0300
>> @@ -1084,7 +1084,7 @@ static int __init smp_sanity_check(unsig
>> #endif
>>
>> if (!physid_isset(hard_smp_processor_id(), phys_cpu_present_map)) {
>> - printk(KERN_WARNING "weird, boot CPU (#%d) not listed"
>> + printk(KERN_WARNING "weird, boot CPU (#%d) not listed "
>> "by the BIOS.\n", hard_smp_processor_id());
>
> btw., the reason for that bug was the incorrect line break in the middle
> of a string - we humans just dont notice a missing space in that context.
>
> So in the final commit i've moved the string to a single line, see it
> attached below.

Oh well. Thanks. There's another very similar thing in
arch/x86/kernel/pci-dma.c, via_no_dac() (attached).

By the way, where such tiny/trivial things should go?

Thanks!

/mjt


Attachments:
viadac.diff (473.00 B)

2008-12-05 13:02:16

by Ingo Molnar

[permalink] [raw]
Subject: Re: [trivial] fix missing space in printk


* Michael Tokarev <[email protected]> wrote:

> >
> > btw., the reason for that bug was the incorrect line break in the
> > middle of a string - we humans just dont notice a missing space in
> > that context.
> >
> > So in the final commit i've moved the string to a single line, see it
> > attached below.
>
> Oh well. Thanks. There's another very similar thing in
> arch/x86/kernel/pci-dma.c, via_no_dac() (attached).

applied - see below. I guess it has your signoff, correct?

> By the way, where such tiny/trivial things should go?

if it touches x86 code, then they can go via the x86 tree.

Ingo

---------------->
>From a0286c94f07636380082608196d41dd725a83229 Mon Sep 17 00:00:00 2001
From: Michael Tokarev <[email protected]>
Date: Fri, 5 Dec 2008 15:47:29 +0300
Subject: [PATCH] x86: fix missing space in printk, #2

Impact: clean up printk

Signed-off-by: Michael Tokarev <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/kernel/pci-dma.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 1926248..dc57299 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -300,8 +300,8 @@ fs_initcall(pci_iommu_init);
static __devinit void via_no_dac(struct pci_dev *dev)
{
if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {
- printk(KERN_INFO "PCI: VIA PCI bridge detected."
- "Disabling DAC.\n");
+ printk(KERN_INFO
+ "PCI: VIA PCI bridge detected. Disabling DAC.\n");
forbid_dac = 1;
}
}