Skip to content

Commit ed0a1ac

Browse files
andy-shevrafaeljw
authored andcommitted
ACPI: PCI: simplify code with acpi_get_local_u64_address()
Now we have a helper so there's no need to open-code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260121085105.2282380-1-andriy.shevchenko@linux.intel.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 24d479d commit ed0a1ac

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/acpi/pci_slot.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ static int
4242
check_slot(acpi_handle handle, unsigned long long *sun)
4343
{
4444
int device = -1;
45-
unsigned long long adr, sta;
45+
unsigned long long sta;
4646
acpi_status status;
47+
u64 adr;
4748
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
4849

4950
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
@@ -56,10 +57,9 @@ check_slot(acpi_handle handle, unsigned long long *sun)
5657
goto out;
5758
}
5859

59-
status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
60-
if (ACPI_FAILURE(status)) {
61-
pr_debug("_ADR returned %d on %s\n",
62-
status, (char *)buffer.pointer);
60+
if (acpi_get_local_u64_address(handle, &adr)) {
61+
pr_debug("_ADR returned with failure on %s\n",
62+
(char *)buffer.pointer);
6363
goto out;
6464
}
6565

0 commit comments

Comments
 (0)