X86 platform drivers
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Armin Wolf <W_Armin@gmx.de>, Andy Shevchenko <andy@kernel.org>,
	 platform-driver-x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] platform/x86: wmi: Use ACPI device name in netlink event
Date: Mon, 22 Jan 2024 14:47:49 +0200 (EET)	[thread overview]
Message-ID: <61d23b7d-8e47-acf8-f3b7-bea1544ca8fa@linux.intel.com> (raw)
In-Reply-To: <1862d74a-7b15-48e3-896b-30dda835f28f@redhat.com>

On Mon, 22 Jan 2024, Hans de Goede wrote:
> 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@gmx.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 ?

Hi Armin,

Have you tried to conduct debian code search to find the code using this?

-- 
 i.

> > ---
> >  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
> > 
> 

  reply	other threads:[~2024-01-22 12:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-21 20:08 [PATCH v2] platform/x86: wmi: Use ACPI device name in netlink event Armin Wolf
2024-01-22 11:29 ` Hans de Goede
2024-01-22 12:47   ` Ilpo Järvinen [this message]
2024-01-22 15:03     ` Armin Wolf
2024-01-24 11:06       ` Hans de Goede
2024-01-24 11:10 ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=61d23b7d-8e47-acf8-f3b7-bea1544ca8fa@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=W_Armin@gmx.de \
    --cc=andy@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox