* [PATCH v2 1/1] ACPI: PCI: simplify code with acpi_get_local_u64_address()
@ 2026-01-21 8:50 Andy Shevchenko
2026-01-21 23:15 ` Bjorn Helgaas
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2026-01-21 8:50 UTC (permalink / raw)
To: Andy Shevchenko, linux-pci, linux-acpi, linux-kernel
Cc: Bjorn Helgaas, Rafael J. Wysocki, Len Brown
Now we have a helper so there's no need to open-code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: fixed a typo (LKP)
drivers/acpi/pci_slot.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
index 741bcc9d6d6a..15234b65ea22 100644
--- a/drivers/acpi/pci_slot.c
+++ b/drivers/acpi/pci_slot.c
@@ -42,8 +42,9 @@ static int
check_slot(acpi_handle handle, unsigned long long *sun)
{
int device = -1;
- unsigned long long adr, sta;
+ unsigned long long sta;
acpi_status status;
+ u64 adr;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
@@ -56,10 +57,9 @@ check_slot(acpi_handle handle, unsigned long long *sun)
goto out;
}
- status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
- if (ACPI_FAILURE(status)) {
- pr_debug("_ADR returned %d on %s\n",
- status, (char *)buffer.pointer);
+ if (acpi_get_local_u64_address(handle, &adr)) {
+ pr_debug("_ADR returned with failure on %s\n",
+ (char *)buffer.pointer);
goto out;
}
--
2.50.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2 1/1] ACPI: PCI: simplify code with acpi_get_local_u64_address()
2026-01-21 8:50 [PATCH v2 1/1] ACPI: PCI: simplify code with acpi_get_local_u64_address() Andy Shevchenko
@ 2026-01-21 23:15 ` Bjorn Helgaas
2026-01-22 7:58 ` Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2026-01-21 23:15 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-pci, linux-acpi, linux-kernel, Bjorn Helgaas,
Rafael J. Wysocki, Len Brown
On Wed, Jan 21, 2026 at 09:50:49AM +0100, Andy Shevchenko wrote:
> 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>
Looks like most drivers/acpi commits capitalize the subject line,
e.g., s/simplify/Simplify/
> ---
>
> v2: fixed a typo (LKP)
>
> drivers/acpi/pci_slot.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
> index 741bcc9d6d6a..15234b65ea22 100644
> --- a/drivers/acpi/pci_slot.c
> +++ b/drivers/acpi/pci_slot.c
> @@ -42,8 +42,9 @@ static int
> check_slot(acpi_handle handle, unsigned long long *sun)
> {
> int device = -1;
> - unsigned long long adr, sta;
> + unsigned long long sta;
> acpi_status status;
> + u64 adr;
> struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
>
> acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
> @@ -56,10 +57,9 @@ check_slot(acpi_handle handle, unsigned long long *sun)
> goto out;
> }
>
> - status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
> - if (ACPI_FAILURE(status)) {
> - pr_debug("_ADR returned %d on %s\n",
> - status, (char *)buffer.pointer);
> + if (acpi_get_local_u64_address(handle, &adr)) {
> + pr_debug("_ADR returned with failure on %s\n",
> + (char *)buffer.pointer);
> goto out;
> }
>
> --
> 2.50.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2 1/1] ACPI: PCI: simplify code with acpi_get_local_u64_address()
2026-01-21 23:15 ` Bjorn Helgaas
@ 2026-01-22 7:58 ` Andy Shevchenko
2026-01-23 19:16 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2026-01-22 7:58 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: linux-pci, linux-acpi, linux-kernel, Bjorn Helgaas,
Rafael J. Wysocki, Len Brown
On Wed, Jan 21, 2026 at 05:15:20PM -0600, Bjorn Helgaas wrote:
> On Wed, Jan 21, 2026 at 09:50:49AM +0100, Andy Shevchenko wrote:
> > 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>
Thank you!
> Looks like most drivers/acpi commits capitalize the subject line,
> e.g., s/simplify/Simplify/
Unless Rafael wants this to be done I would leave it for now as is,
but I will try to remember this for the future contributions, thanks!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/1] ACPI: PCI: simplify code with acpi_get_local_u64_address()
2026-01-22 7:58 ` Andy Shevchenko
@ 2026-01-23 19:16 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2026-01-23 19:16 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Bjorn Helgaas, linux-pci, linux-acpi, linux-kernel, Bjorn Helgaas,
Rafael J. Wysocki, Len Brown
On Thu, Jan 22, 2026 at 8:58 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Wed, Jan 21, 2026 at 05:15:20PM -0600, Bjorn Helgaas wrote:
> > On Wed, Jan 21, 2026 at 09:50:49AM +0100, Andy Shevchenko wrote:
> > > 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>
>
> Thank you!
Applied, thanks!
> > Looks like most drivers/acpi commits capitalize the subject line,
> > e.g., s/simplify/Simplify/
>
> Unless Rafael wants this to be done I would leave it for now as is,
I don't think it matters that much ...
> but I will try to remember this for the future contributions, thanks!
... but consistency will be appreciated. Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-23 19:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-21 8:50 [PATCH v2 1/1] ACPI: PCI: simplify code with acpi_get_local_u64_address() Andy Shevchenko
2026-01-21 23:15 ` Bjorn Helgaas
2026-01-22 7:58 ` Andy Shevchenko
2026-01-23 19:16 ` 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