Skip to contentSkip to conversation

Reduce ACPI resource conflict message to KERN_INFO

PATCH In review Chase Douglas 2 participants 4 messages Mar 2, 2010 – Mar 3, 2010 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Reduce ACPI resource conflict message to KERN_INFO

From: Chase Douglas <[email protected]>

By default, ACPI resource conflict messages are logged at level KERN_ERR. This is a rather high level for a message that is more a warning than an indication of a real kernel error. Also, KERN_ERR level messages can appear over some boot splash screens, and this message is not serious enough to warrant such treatment. Thus, the log level has been reduced to KERN_INFO.

---
 drivers/acpi/osl.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/acpi/osl.c +1 -3
index 02e8464..9689b68 100644
@@ -1151,11 +1151,9 @@ int acpi_check_resource_conflict(const struct resource *res)
 
 	if (clash) {
 		if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) {
-			printk("%sACPI: %s resource %s [0x%llx-0x%llx]"
+			printk(KERN_INFO "ACPI: %s resource %s [0x%llx-0x%llx]"
 			       " conflicts with ACPI region %s"
 			       " [0x%llx-0x%llx]\n",
-			       acpi_enforce_resources == ENFORCE_RESOURCES_LAX
-			       ? KERN_WARNING : KERN_ERR,
 			       ioport ? "I/O" : "Memory", res->name,
 			       (long long) res->start, (long long) res->end,
 			       res_list_elem->name,
Signature · 1 line
1.6.3.3
#1 lore raw

drivers/acpi/osl.c int acpi_check_resource_conflict(const struct resource *res) · line 1159

Quoted 9 lines · Chase Douglas
drivers/acpi/osl.c +1 -3
-			printk("%sACPI: %s resource %s [0x%llx-0x%llx]"
+			printk(KERN_INFO "ACPI: %s resource %s [0x%llx-0x%llx]"
 			       " conflicts with ACPI region %s"
 			       " [0x%llx-0x%llx]\n",
-			       acpi_enforce_resources == ENFORCE_RESOURCES_LAX
-			       ? KERN_WARNING : KERN_ERR,
 			       ioport ? "I/O" : "Memory", res->name,
 			       (long long) res->start, (long long) res->end,
 			       res_list_elem->name,

Since you're touching this anyway, can you convert this to use %pR?

Bjorn

#2 lore raw
Quoted 12 lines · Bjorn Helgaas

drivers/acpi/osl.c int acpi_check_resource_conflict(const struct resource *res) · line 1159

Quoted 9 lines · Chase Douglas
drivers/acpi/osl.c +1 -3
-			printk("%sACPI: %s resource %s [0x%llx-0x%llx]"
+			printk(KERN_INFO "ACPI: %s resource %s [0x%llx-0x%llx]"
 			       " conflicts with ACPI region %s"
 			       " [0x%llx-0x%llx]\n",
-			       acpi_enforce_resources == ENFORCE_RESOURCES_LAX
-			       ? KERN_WARNING : KERN_ERR,
 			       ioport ? "I/O" : "Memory", res->name,
 			       (long long) res->start, (long long) res->end,
 			       res_list_elem->name,

Since you're touching this anyway, can you convert this to use %pR?

I see the potential usage of %p, but is the 'R' a typo? I haven't found it in man 3 fprintf nor in a google search.

Thanks,
Chase

#3 lore raw
Quoted 14 lines · Chase Douglas
Quoted 12 lines · Bjorn Helgaas

drivers/acpi/osl.c int acpi_check_resource_conflict(const struct resource *res) · line 1159

Quoted 9 lines · Chase Douglas
drivers/acpi/osl.c +1 -3
-			printk("%sACPI: %s resource %s [0x%llx-0x%llx]"
+			printk(KERN_INFO "ACPI: %s resource %s [0x%llx-0x%llx]"
 			       " conflicts with ACPI region %s"
 			       " [0x%llx-0x%llx]\n",
-			       acpi_enforce_resources == ENFORCE_RESOURCES_LAX
-			       ? KERN_WARNING : KERN_ERR,
 			       ioport ? "I/O" : "Memory", res->name,
 			       (long long) res->start, (long long) res->end,
 			       res_list_elem->name,

Since you're touching this anyway, can you convert this to use %pR?

Quoted 2 lines

I see the potential usage of %p, but is the 'R' a typo? I haven't found it in man 3 fprintf nor in a google search.

Nope, see this description of the %p<x> kernel extensions:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=lib/vsprintf.c;hb=51c24aaacaea90c8e87f1dec75a2ac7622b593f8#l915

There are several examples already in the tree, including drivers/pci/setup-bus.c.

Bjorn