On 9/15/21 7:53 PM, Rafael J. Wysocki wrote:
On Tue, Sep 14, 2021 at 3:34 PM Hui Wang <hui.wang@xxxxxxxxxxxxx> wrote:
[...]
+ override = check_override && acpi_dev_irq_override(gsi, triggering,
+ polarity, shareable);
+
This can be still made more straightforward.
The local bool variable is not necessary and check below can be
rearranged as follows below.
/*
* In IO-APIC mode, use overridden attribute. Two reasons:
* 1. BIOS bug in DSDT
@@ -401,7 +448,7 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi,
* using extended IRQ descriptors we take the IRQ configuration
* from _CRS directly.
*/
- if (legacy && !acpi_get_override_irq(gsi, &t, &p)) {
+ if (override && !acpi_get_override_irq(gsi, &t, &p)) {
if (check_override &&
acpi_dev_irq_override(gsi, triggering, polarity, shareable) &&
!acpi_get_override_irq(gsi, &t, &p)) {
OK, got it. will change to it in the v3.
Thanks.
u8 trig = t ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE;
u8 pol = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH;
--
2.25.1