ACPI / x86: boot: Get rid of ACPI_INVALID_GSI
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 15 Dec 2017 21:25:09 +0000 (23:25 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 28 Dec 2017 11:36:46 +0000 (12:36 +0100)
commit220580fb0d0a71cff0f17c24463c787f43dd6626
tree8cd740efb8156a048c8e1cf5299fbd455bd49d30
parent7d7fb91cb43aebdcadca6a0fce25c3174feab980
ACPI / x86: boot: Get rid of ACPI_INVALID_GSI

Commit 49e4b84333f3 (ACPI: Use correct IRQ when uninstalling ACPI
interrupt handler) brings a new definition for invalid ACPI IRQ,
i.e. INVALID_ACPI_IRQ, which is defined to 0xffffffff (or -1 for
unsigned value).

Get rid of a former one, which was brought in by commit 2c0a6894df19
(x86, ACPI, irq: Enhance error handling in function acpi_register_gsi()),
in favour of latter.

To clarify the rationale of changing from INT_MIN to ((unsigned)-1)
definition consider the following:
- IRQ 0 is valid one in hardware, so, better not to use it everywhere
  (Linux uses 0 as NO IRQ, though it's another story)
- INT_MIN splits the range into two, while 0xffffffff reserves only the
  last item
- when type casting is done in most cases 0xff, 0xffff is naturally used
  as a marker of invalid HW IRQ: for example PCI INT line 0xff means
  no IRQ assigned by BIOS

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
arch/x86/kernel/acpi/boot.c