Re: [RFC PATCH v1 13/30] platform/x86: wmi: use dynamic debug to print data about events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 9/4/21 7:55 PM, Barnabás Pőcze wrote:
> The dynamic debug framework provides a more flexible
> way to configure debugging messages emitted by the kernel
> than module options. Use `dev_dbg()` in `acpi_wmi_notify_handler()`
> to print the event identifier and device name (which is the GUID).
> 
> Signed-off-by: Barnabás Pőcze <pobrn@xxxxxxxxxxxxxx>
> ---
>  drivers/platform/x86/wmi.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index 90ba75247d7f..8aad8f080c64 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -1313,8 +1313,7 @@ static void acpi_wmi_notify_handler(acpi_handle handle, u32 event,
>  		wblock->handler(event, wblock->handler_data);
>  	}
> 
> -	if (debug_event)
> -		pr_info("DEBUG Event GUID: %pUL\n", wblock->gblock.guid);
> +	dev_dbg(&wblock->dev.dev, "event 0x%02X\n", event);

The debug_event value gets set by a module-parameter and several WMI related
howto-s and forum threads on the web refer to this. At one point in time even:
https://wiki.ubuntu.com/Hotkeys/Troubleshooting

Used to refer to this, but they seem to have dropped this.

Either way this changes makes users have to also deal with dyndbg stuff to
get the same info which before they could get with just the debug_event module
param, which makes debugging harder, so I'm going to drop this patch from the
series.

Regards,

Hans


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




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux