Skip to contentSkip to conversation

fix missing space in printk

trivial Applied Michael Tokarev 2 participants 4 messages Dec 5, 2008 x86

lore
Share & tools
lore
#0 lore raw

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

And oh,

;)

/mjt

arch/x86/kernel/smpboot.c +1 -1
@@ -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());
 		physid_set(hard_smp_processor_id(), phys_cpu_present_map);
 	}
Applied
#1 lore raw
Quoted 8 lines · Michael Tokarev

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

And oh,

;)

applied to tip/x86/cleanups.

arch/x86/kernel/smpboot.c static int __init smp_sanity_check(unsig · line 1088

Quoted 9 lines
arch/x86/kernel/smpboot.c +1 -1
@@ -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

--------------->

Quoted 1 line

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 ;)

---
 arch/x86/kernel/smpboot.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
arch/x86/kernel/smpboot.c +4 -2
index 7b10933..1a3c325 100644
@@ -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);
 	}
 
#2 lore raw
Quoted 26 lines · Ingo Molnar
Quoted 8 lines · Michael Tokarev

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

And oh,

;)

applied to tip/x86/cleanups.

arch/x86/kernel/smpboot.c static int __init smp_sanity_check(unsig · line 1088

Quoted 9 lines
arch/x86/kernel/smpboot.c +1 -1
@@ -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.

Quoted 2 lines

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

arch/x86/kernel/pci-dma.c +2 -2
@@ -409,8 +409,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;
 	}
 }
#3 lore raw
Quoted 10 lines · Michael Tokarev
Quoted 7 lines

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?

Quoted 1 line

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

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

Ingo

---------------->

Quoted 1 line

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

---
 arch/x86/kernel/pci-dma.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/pci-dma.c +2 -2
index 1926248..dc57299 100644
@@ -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;
 	}
 }