platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v1 23/30] platform/x86: wmi: improve debug messages
@ 2021-09-04 17:56 Barnabás Pőcze
  2021-09-13  9:58 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Barnabás Pőcze @ 2021-09-04 17:56 UTC (permalink / raw)
  To: Hans de Goede, Mark Gross, platform-driver-x86

Print the event identifier number in addition to
the already printed information, and use %u for
printing unsigned values in `wmi_notify_debug()`.

Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
---
 drivers/platform/x86/wmi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index fcc867d79e91..ec5ba2970840 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -485,10 +485,10 @@ static void wmi_notify_debug(u32 value, void *context)
 	if (!obj)
 		return;

-	pr_info("DEBUG Event ");
+	pr_info("DEBUG: event 0x%02X ", value);
 	switch (obj->type) {
 	case ACPI_TYPE_BUFFER:
-		pr_cont("BUFFER_TYPE - length %d\n", obj->buffer.length);
+		pr_cont("BUFFER_TYPE - length %u\n", obj->buffer.length);
 		break;
 	case ACPI_TYPE_STRING:
 		pr_cont("STRING_TYPE - %s\n", obj->string.pointer);
@@ -497,7 +497,7 @@ static void wmi_notify_debug(u32 value, void *context)
 		pr_cont("INTEGER_TYPE - %llu\n", obj->integer.value);
 		break;
 	case ACPI_TYPE_PACKAGE:
-		pr_cont("PACKAGE_TYPE - %d elements\n", obj->package.count);
+		pr_cont("PACKAGE_TYPE - %u elements\n", obj->package.count);
 		break;
 	default:
 		pr_cont("object type 0x%X\n", obj->type);
--
2.33.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH v1 23/30] platform/x86: wmi: improve debug messages
  2021-09-04 17:56 [RFC PATCH v1 23/30] platform/x86: wmi: improve debug messages Barnabás Pőcze
@ 2021-09-13  9:58 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2021-09-13  9:58 UTC (permalink / raw)
  To: Barnabás Pőcze, Mark Gross, platform-driver-x86

Hi,

On 9/4/21 7:56 PM, Barnabás Pőcze wrote:
> Print the event identifier number in addition to
> the already printed information, and use %u for
> printing unsigned values in `wmi_notify_debug()`.
> 
> Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
> ---
>  drivers/platform/x86/wmi.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index fcc867d79e91..ec5ba2970840 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -485,10 +485,10 @@ static void wmi_notify_debug(u32 value, void *context)
>  	if (!obj)
>  		return;
> 
> -	pr_info("DEBUG Event ");
> +	pr_info("DEBUG: event 0x%02X ", value);
>  	switch (obj->type) {
>  	case ACPI_TYPE_BUFFER:
> -		pr_cont("BUFFER_TYPE - length %d\n", obj->buffer.length);
> +		pr_cont("BUFFER_TYPE - length %u\n", obj->buffer.length);
>  		break;
>  	case ACPI_TYPE_STRING:
>  		pr_cont("STRING_TYPE - %s\n", obj->string.pointer);
> @@ -497,7 +497,7 @@ static void wmi_notify_debug(u32 value, void *context)
>  		pr_cont("INTEGER_TYPE - %llu\n", obj->integer.value);
>  		break;
>  	case ACPI_TYPE_PACKAGE:
> -		pr_cont("PACKAGE_TYPE - %d elements\n", obj->package.count);
> +		pr_cont("PACKAGE_TYPE - %u elements\n", obj->package.count);
>  		break;
>  	default:
>  		pr_cont("object type 0x%X\n", obj->type);

Note I've _added_ the following chunk here to compensate for the dropping of the
patch switching to dev_dbg which also added the printing of the event:

@@ -1316,7 +1316,7 @@ static void acpi_wmi_notify_handler(acpi_handle handle, u32 ev
        }

        if (debug_event)
-               pr_info("DEBUG Event GUID: %pUL\n", &wblock->gblock.guid);
+               pr_info("DEBUG: GUID %pUL event 0x%02X\n", &wblock->gblock.guid, eve

        acpi_bus_generate_netlink_event(
                wblock->acpi_device->pnp.device_class,


Regards,

Hans


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-13  9:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-04 17:56 [RFC PATCH v1 23/30] platform/x86: wmi: improve debug messages Barnabás Pőcze
2021-09-13  9:58 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).