Re: [PATCH v1] ACPI: bus: Drop two fields from struct acpi_device_pnp
"Rafael J. Wysocki (Intel)" <[email protected]>
| Newsgroups | org.kernel.vger.linux-acpi,org.kernel.vger.linux-kernel,org.kernel.vger.platform-driver-x86 |
|---|---|
| Message-ID | <CAJZ5v0jKCLBuSQX0EnzEftQZaq4ZSCpTFOGP5u4cx2gxieJpLQ@mail.gmail.com> |
On Tue, Sep 1, 2026 at 9:45 AM Andy Shevchenko <[email protected]> wrote: > > On Mon, Aug 31, 2026 at 10:07:10PM +0200, Rafael J. Wysocki wrote: > > > There are two fields in struct acpi_device_pnp, device_name and > > device_class, that were supposed to be populated and used by device > > drivers, but they have never been used consistently and now they > > are only set for the bus object in acpi_set_pnp_ids() (and never > > read afterward). > > > > Drop them along with all of the associated symbols except for > > MAX_ACPI_CLASS_NAME_LEN and the acpi_device_class typedef that > > are used by the ACPI netlink messaging code. Move those two > > definitions closer to the struct acpi_bus_event that refers to > > the acpi_device_class type. > > Reviewed-by: Andy Shevchenko <[email protected]> > > ... > > > +#define MAX_ACPI_CLASS_NAME_LEN 20 > > +typedef char acpi_device_class[MAX_ACPI_CLASS_NAME_LEN]; > > Are you planning to use this in some future code? > > > struct acpi_bus_event { > > struct list_head node; > > acpi_device_class device_class; > > Otherwise I would go with complete replacement of the above to simple > > char acpi_device_class[20]; > > here. This is in use in the Thinkpad driver. It might be replaced with something else, but that would be a separate patch.