* [PATCH v1] PCI: acpiphp_ibm: Do not use uninitialized device_class
@ 2026-07-06 12:40 Rafael J. Wysocki
2026-07-08 14:33 ` Andy Shevchenko
2026-07-10 20:30 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2026-07-06 12:40 UTC (permalink / raw)
To: Linux ACPI; +Cc: Bjorn Helgaas, Linux PCI, LKML, Andy Shevchenko
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Passing an uninitialized pnp.device_class string to
acpi_bus_generate_netlink_event() is effectively equivalent
to passing an empty string literal to it.
Accordingly, make the driver do the latter instead of doing the
former.
No intentional functional impact.
This will facilitate the removal of device_class from struct
acpi_device_pnp in the future.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/pci/hotplug/acpiphp_ibm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
index f8016ed24523..7337bd1ac6df 100644
--- a/drivers/pci/hotplug/acpiphp_ibm.c
+++ b/drivers/pci/hotplug/acpiphp_ibm.c
@@ -258,8 +258,7 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
if (subevent == 0x80) {
pr_debug("%s: generating bus event\n", __func__);
- acpi_bus_generate_netlink_event(note->device->pnp.device_class,
- dev_name(¬e->device->dev),
+ acpi_bus_generate_netlink_event("", dev_name(¬e->device->dev),
note->event, detail);
} else
note->event = event;
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] PCI: acpiphp_ibm: Do not use uninitialized device_class
2026-07-06 12:40 [PATCH v1] PCI: acpiphp_ibm: Do not use uninitialized device_class Rafael J. Wysocki
@ 2026-07-08 14:33 ` Andy Shevchenko
2026-07-10 20:30 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2026-07-08 14:33 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Linux ACPI, Bjorn Helgaas, Linux PCI, LKML
On Mon, Jul 06, 2026 at 02:40:22PM +0200, Rafael J. Wysocki wrote:
> Passing an uninitialized pnp.device_class string to
> acpi_bus_generate_netlink_event() is effectively equivalent
> to passing an empty string literal to it.
>
> Accordingly, make the driver do the latter instead of doing the
> former.
>
> No intentional functional impact.
>
> This will facilitate the removal of device_class from struct
> acpi_device_pnp in the future.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] PCI: acpiphp_ibm: Do not use uninitialized device_class
2026-07-06 12:40 [PATCH v1] PCI: acpiphp_ibm: Do not use uninitialized device_class Rafael J. Wysocki
2026-07-08 14:33 ` Andy Shevchenko
@ 2026-07-10 20:30 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2026-07-10 20:30 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Linux ACPI, Bjorn Helgaas, Linux PCI, LKML, Andy Shevchenko
On Mon, Jul 06, 2026 at 02:40:22PM +0200, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
>
> Passing an uninitialized pnp.device_class string to
> acpi_bus_generate_netlink_event() is effectively equivalent
> to passing an empty string literal to it.
>
> Accordingly, make the driver do the latter instead of doing the
> former.
>
> No intentional functional impact.
>
> This will facilitate the removal of device_class from struct
> acpi_device_pnp in the future.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Applied to pci/hotplug for v7.3, thanks!
> ---
> drivers/pci/hotplug/acpiphp_ibm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c
> index f8016ed24523..7337bd1ac6df 100644
> --- a/drivers/pci/hotplug/acpiphp_ibm.c
> +++ b/drivers/pci/hotplug/acpiphp_ibm.c
> @@ -258,8 +258,7 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
>
> if (subevent == 0x80) {
> pr_debug("%s: generating bus event\n", __func__);
> - acpi_bus_generate_netlink_event(note->device->pnp.device_class,
> - dev_name(¬e->device->dev),
> + acpi_bus_generate_netlink_event("", dev_name(¬e->device->dev),
> note->event, detail);
> } else
> note->event = event;
> --
> 2.51.0
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-10 20:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 12:40 [PATCH v1] PCI: acpiphp_ibm: Do not use uninitialized device_class Rafael J. Wysocki
2026-07-08 14:33 ` Andy Shevchenko
2026-07-10 20:30 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox