[PATCH v2 0/3] ACPI: button: Fixes related to GPE handling and probe error path

From: Rafael J. Wysocki

Date: Fri May 22 2026 - 11:41:29 EST


Hi All,

This is an update of

https://lore.kernel.org/linux-acpi/5996185.DvuYhMxLoT@rafael.j.wysocki/

sent to address sashiko.dev feedback on patch [2/3]:

> > @@ -106,8 +109,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device,
> > u32 gpe_number)> >
> > */
> >
> > gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
> > if (gpe_event_info) {
> >
> > - if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) !=
> > - ACPI_GPE_DISPATCH_NONE) {
> > + if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) & dispatch_type_mask)
> > {
>
> Does this incorrectly treat sequential enumeration values as bit flags?
> ACPI_GPE_DISPATCH_METHOD is defined as 1, and ACPI_GPE_DISPATCH_NOTIFY is 3.
> Since dispatch_type_mask is passed as ACPI_GPE_DISPATCH_METHOD (1) from
> acpi_button_probe(), this bitwise AND evaluates to true for both METHOD
> (1 & 1 == 1) and NOTIFY (3 & 1 == 1).
> Could this unintentionally enable GPEs for NOTIFY handlers?

The original series description below still applies.

This series fix three issues related to the ACPI button driver,
one introduced during the 6.15 development cycle, one from the 7.0
cycle, and one that has been there for a long time, but has been
omitted by mistake by a recent commit.

Thanks!