Skip to contentSkip to conversation

Minor _OSC error handling improvements

PATCH Superseded Andy Lutomirski 6 participants 10 messages Nov 19, 2015 – Dec 15, 2015

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Minor _OSC error handling improvements

This doesn't fix any bugs, but it makes the debugging output a little more useful.

Andy Lutomirski (2):
acpi: Tidy up _OSC error spacing
acpi: Show _OSC UUID when _OSC fails

 drivers/acpi/bus.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/2 acpi: Tidy up _OSC error spacing

The whitespace in _OSC error reports is weird. Improve it.

---
 drivers/acpi/bus.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/acpi/bus.c +3 -3
index a212cefae524..2177ef0b16e4 100644
@@ -182,12 +182,12 @@ static void acpi_print_osc_error(acpi_handle handle,
 	if (ACPI_FAILURE(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer)))
 		printk(KERN_DEBUG "%s\n", error);
 	else {
-		printk(KERN_DEBUG "%s:%s\n", (char *)buffer.pointer, error);
+		printk(KERN_DEBUG "%s: %s\n", (char *)buffer.pointer, error);
 		kfree(buffer.pointer);
 	}
-	printk(KERN_DEBUG"_OSC request data:");
+	printk(KERN_DEBUG "_OSC request data:");
 	for (i = 0; i < context->cap.length; i += sizeof(u32))
-		printk("%x ", *((u32 *)(context->cap.pointer + i)));
+		printk(" %x", *((u32 *)(context->cap.pointer + i)));
 	printk("\n");
 }
 
Signature · 1 line
2.5.0
#2 lore raw

Re: [PATCH 1/2] acpi: Tidy up _OSC error spacing

Forwarding to linux-acpi.

Quoted 30 lines · Andy Lutomirski

The whitespace in _OSC error reports is weird. Improve it.

---
 drivers/acpi/bus.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/acpi/bus.c +3 -4
index a212cefae524..2177ef0b16e4 100644
@@ -182,12 +182,12 @@ static void acpi_print_osc_error(acpi_handle handle,
        if (ACPI_FAILURE(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer)))
                printk(KERN_DEBUG "%s\n", error);
        else {
-               printk(KERN_DEBUG "%s:%s\n", (char *)buffer.pointer, error);
+               printk(KERN_DEBUG "%s: %s\n", (char *)buffer.pointer, error);
                kfree(buffer.pointer);
        }
-       printk(KERN_DEBUG"_OSC request data:");
+       printk(KERN_DEBUG "_OSC request data:");
        for (i = 0; i < context->cap.length; i += sizeof(u32))
-               printk("%x ", *((u32 *)(context->cap.pointer + i)));
+               printk(" %x", *((u32 *)(context->cap.pointer + i)));
        printk("\n");
 }
 
--

2.5.0

Signature · 2 lines
Andy Lutomirski
AMA Capital Management, LLC
#3 lore raw

Re: [PATCH 1/2] acpi: Tidy up _OSC error spacing

Quoted 4 lines · Andy Lutomirski

Forwarding to linux-acpi.

Quoted 1 line · Andy Lutomirski

The whitespace in _OSC error reports is weird. Improve it.

Both patches look good to me.

I'll be queuing them up for 4.5 if there are no objections.

Thanks,
Rafael

#4 lore raw

PATCH 2/2 acpi: Show _OSC UUID when _OSC fails

In reply to Andy Lutomirski

When _OSC fails and especially when it fails due to an invalid UUID, it's helpful to show the UUID that we tried.

---
 drivers/acpi/bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/bus.c +2 -2
index 2177ef0b16e4..be2b164f8f2d 100644
@@ -180,9 +180,9 @@ static void acpi_print_osc_error(acpi_handle handle,
 	int i;
 
 	if (ACPI_FAILURE(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer)))
-		printk(KERN_DEBUG "%s\n", error);
+		printk(KERN_DEBUG "%s: %s\n", context->uuid_str, error);
 	else {
-		printk(KERN_DEBUG "%s: %s\n", (char *)buffer.pointer, error);
+		printk(KERN_DEBUG "%s (%s): %s\n", (char *)buffer.pointer, context->uuid_str, error);
 		kfree(buffer.pointer);
 	}
 	printk(KERN_DEBUG "_OSC request data:");
Signature · 1 line
2.5.0
#5 lore raw

Re: [PATCH 2/2] acpi: Show _OSC UUID when _OSC fails

Forwarding to linux-acpi.

Quoted 27 lines · Andy Lutomirski

When _OSC fails and especially when it fails due to an invalid UUID, it's helpful to show the UUID that we tried.

---
 drivers/acpi/bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/bus.c +2 -3
index 2177ef0b16e4..be2b164f8f2d 100644
@@ -180,9 +180,9 @@ static void acpi_print_osc_error(acpi_handle handle,
        int i;
 
        if (ACPI_FAILURE(acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer)))
-               printk(KERN_DEBUG "%s\n", error);
+               printk(KERN_DEBUG "%s: %s\n", context->uuid_str, error);
        else {
-               printk(KERN_DEBUG "%s: %s\n", (char *)buffer.pointer, error);
+               printk(KERN_DEBUG "%s (%s): %s\n", (char *)buffer.pointer, context->uuid_str, error);
                kfree(buffer.pointer);
        }
        printk(KERN_DEBUG "_OSC request data:");
--

2.5.0

Signature · 2 lines
Andy Lutomirski
AMA Capital Management, LLC
#6 lore raw
In reply to Andy Lutomirski
Quoted 9 lines · Andy Lutomirski

This doesn't fix any bugs, but it makes the debugging output a little more useful.

Andy Lutomirski (2):
acpi: Tidy up _OSC error spacing
acpi: Show _OSC UUID when _OSC fails

 drivers/acpi/bus.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Can you please CC ACPI-related patches to [email protected], especially when they touch files under drivers/acpi/?

Thanks,
Rafael

Acked-by on the v1 series
#7 lore raw
In reply to Andy Lutomirski
Quoted 9 lines · Andy Lutomirski

This doesn't fix any bugs, but it makes the debugging output a little more useful.

Andy Lutomirski (2):
acpi: Tidy up _OSC error spacing
acpi: Show _OSC UUID when _OSC fails

 drivers/acpi/bus.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

These both look fine to me. If you want it:

#8 lore raw

[cc: linux-acpi and Rafael -- whoops]

Rafael, do you want me to resend these?

--Andy

Quoted 14 lines · Bjorn Helgaas
Quoted 9 lines · Andy Lutomirski

This doesn't fix any bugs, but it makes the debugging output a little more useful.

Andy Lutomirski (2):
acpi: Tidy up _OSC error spacing
acpi: Show _OSC UUID when _OSC fails

 drivers/acpi/bus.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

These both look fine to me. If you want it:

Signature · 2 lines
Andy Lutomirski
AMA Capital Management, LLC
#9 lore raw
Quoted 3 lines · Andy Lutomirski

[cc: linux-acpi and Rafael -- whoops]

Rafael, do you want me to resend these?

Yes, please.

Thanks,
Rafael

Quoted 16 lines · Bjorn Helgaas
Quoted 13 lines · Andy Lutomirski
Quoted 9 lines

This doesn't fix any bugs, but it makes the debugging output a little more useful.

Andy Lutomirski (2):
acpi: Tidy up _OSC error spacing
acpi: Show _OSC UUID when _OSC fails

  drivers/acpi/bus.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

These both look fine to me. If you want it: