linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: GED: use correct trigger type field in  _Exx / _Lxx handling
@ 2020-05-27 11:37 Ard Biesheuvel
  2020-05-27 15:57 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Ard Biesheuvel @ 2020-05-27 11:37 UTC (permalink / raw)
  To: linux-acpi; +Cc: rjw, lenb, linux-kernel, Ard Biesheuvel

Commit ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler
methods") added a reference to the 'triggering' field of either the
normal or the extended ACPI IRQ resource struct, but inadvertently used
the wrong pointer in the latter case. Note that both pointers refer to the
same union, and the 'triggering' field appears at the same offset in both
struct types, so it currently happens to work by accident. But let's fix
it nonetheless

Fixes: ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler methods")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
 drivers/acpi/evged.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/evged.c b/drivers/acpi/evged.c
index 6d7a522952bf..ccd900690b6f 100644
--- a/drivers/acpi/evged.c
+++ b/drivers/acpi/evged.c
@@ -94,7 +94,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,
 		trigger = p->triggering;
 	} else {
 		gsi = pext->interrupts[0];
-		trigger = p->triggering;
+		trigger = pext->triggering;
 	}
 
 	irq = r.start;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI: GED: use correct trigger type field in _Exx / _Lxx handling
  2020-05-27 11:37 [PATCH] ACPI: GED: use correct trigger type field in _Exx / _Lxx handling Ard Biesheuvel
@ 2020-05-27 15:57 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2020-05-27 15:57 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: ACPI Devel Maling List, Rafael J. Wysocki, Len Brown,
	Linux Kernel Mailing List

On Wed, May 27, 2020 at 1:37 PM Ard Biesheuvel <ardb@kernel.org> wrote:
>
> Commit ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler
> methods") added a reference to the 'triggering' field of either the
> normal or the extended ACPI IRQ resource struct, but inadvertently used
> the wrong pointer in the latter case. Note that both pointers refer to the
> same union, and the 'triggering' field appears at the same offset in both
> struct types, so it currently happens to work by accident. But let's fix
> it nonetheless
>
> Fixes: ea6f3af4c5e63f69 ("ACPI: GED: add support for _Exx / _Lxx handler methods")
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> ---
>  drivers/acpi/evged.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/evged.c b/drivers/acpi/evged.c
> index 6d7a522952bf..ccd900690b6f 100644
> --- a/drivers/acpi/evged.c
> +++ b/drivers/acpi/evged.c
> @@ -94,7 +94,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,
>                 trigger = p->triggering;
>         } else {
>                 gsi = pext->interrupts[0];
> -               trigger = p->triggering;
> +               trigger = pext->triggering;
>         }
>
>         irq = r.start;
> --

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-27 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 11:37 [PATCH] ACPI: GED: use correct trigger type field in _Exx / _Lxx handling Ard Biesheuvel
2020-05-27 15:57 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).