Missing newline in acpi messes up dmesg output
PATCH 1/1 Missing newline in acpi messes up dmesg output
Hi,
There's a tiny bug in 2.6.18-rc1.
In drivers/acpi/bus.c::acpi_bus_set_power() there's a check to see if the device is power_manageable and if not then print a debug message and return -ENODEV. The debug printk() is missing a \n.
The printk statement looks like this :
printk(KERN_DEBUG "Device `[%s]' is not power manageable",
device->kobj.name);
As you can see, there's no newline at the end, and that causes problems for the next message to be printed.
On my system the above results in this in dmesg :
...
Device `[PEB1]' is not power manageable<6>ACPI: PCI Interrupt 0000:00:01.0[A] -> GSI 29 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:01.0 to 64
Device `[PEB2]' is not power manageable<6>ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 34 (level, low) -> IRQ 17
...
Adding a newline (as the patch below does) turns this into
...
Device `[PEB1]' is not power manageable
ACPI: PCI Interrupt 0000:00:01.0[A] -> GSI 29 (level, low) -> IRQ 16
PCI: Setting latency timer of device 0000:00:01.0 to 64 Device `[PEB2]' is not power manageable
ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 34 (level, low) -> IRQ 17
...
Which is much nicer :-)
---
drivers/acpi/bus.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/bus.c +1 -1
@@ -192,7 +192,7 @@ int acpi_bus_set_power(acpi_handle handl/* Make sure this is a valid target state */ if (!device->flags.power_manageable) { -printk (KERN_DEBUG "Device `[%s]' is not power manageable" , +printk (KERN_DEBUG "Device `[%s]' is not power manageable\n" , device->kobj.name);return -ENODEV ; }