[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1862d74a-7b15-48e3-896b-30dda835f28f@redhat.com>
Date: Mon, 22 Jan 2024 12:29:43 +0100
From: Hans de Goede <hdegoede@...hat.com>
To: Armin Wolf <W_Armin@....de>, ilpo.jarvinen@...ux.intel.com,
Andy Shevchenko <andy@...nel.org>
Cc: platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] platform/x86: wmi: Use ACPI device name in netlink
event
Hi Armin,
On 1/21/24 21:08, Armin Wolf wrote:
> The device name inside the ACPI netlink event is limited to
> 15 characters, so the WMI device name will get truncated.
>
> This can be observed with kacpimon when receiving an event
> from WMI device "9DBB5994-A997-11DA-B012-B622A1EF5492":
>
> netlink: 9DBB5994-A997- 000000d0 00000000
>
> Fix this by using the shorter device name from the ACPI
> bus device instead. This still allows users to uniquely
> identify the WMI device by using the notify id (0xd0).
>
> Signed-off-by: Armin Wolf <W_Armin@....de>
> ---
> Changes since v1:
> - use acpi_dev_name() helper function
I'm a bit divided on this patch. I agree the new way of doing
things is better, but technically this is a bit of a userspace API
break.
I guess we could hope that nothing depends on the old netlink API
format / name but I'm not sure we can rely on that ...
Ilpo, Andy do you have any opinion on this ?
Regards,
Hans
> ---
> drivers/platform/x86/wmi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> index a7cfcbf92432..c61860db66ed 100644
> --- a/drivers/platform/x86/wmi.c
> +++ b/drivers/platform/x86/wmi.c
> @@ -1202,7 +1202,7 @@ static int wmi_notify_device(struct device *dev, void *data)
> }
>
> acpi_bus_generate_netlink_event(wblock->acpi_device->pnp.device_class,
> - dev_name(&wblock->dev.dev), *event, 0);
> + acpi_dev_name(wblock->acpi_device), *event, 0);
>
> return -EBUSY;
> }
> --
> 2.39.2
>
Powered by blists - more mailing lists