Skip to contentSkip to conversation

PCI/ACPI: use ACPI Method Name macro directly

PATCH Applied Yipeng Zou 2 participants 3 messages Nov 4, 2022 – Nov 8, 2022

Subsystems (2)
lore
Share & tools
lore

Yipeng Zou

author
#0 lore raw

PATCH 1/1 PCI/ACPI: use ACPI Method Name macro directly

It's convenience to find all at once, use METHOD_NAME__UID as path string.

Fixes 169de969c018 ("PCI/ACPI: Provide acpi_get_rc_resources() for ARM64 platform")
---
 drivers/pci/pci-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci-acpi.c +1 -1
index a46fec776ad7..068d6745bf98 100644
@@ -67,7 +67,7 @@ static acpi_status acpi_match_rc(acpi_handle handle, u32 lvl, void *context,
 	unsigned long long uid;
 	acpi_status status;
 
-	status = acpi_evaluate_integer(handle, "_UID", NULL, &uid);
+	status = acpi_evaluate_integer(handle, METHOD_NAME__UID, NULL, &uid);
 	if (ACPI_FAILURE(status) || uid != *segment)
 		return AE_CTRL_DEPTH;
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 4 lines · Yipeng Zou

It's convenience to find all at once, use METHOD_NAME__UID as path string.

Fixes 169de969c018 ("PCI/ACPI: Provide acpi_get_rc_resources() for ARM64 platform")

Applied to pci/misc for v6.2, thanks!

I dropped the "Fixes:" tag because there's no reason to backport this to any older kernels.

I assume you're doing the same for other instances?

  drivers/acpi/acpi_processor.c:          status = acpi_evaluate_integer(handle, "_UID", NULL, &uid);
  drivers/acpi/dock.c:                                    "_UID", NULL, &lbuf);
  drivers/acpi/processor_pdc.c:           status = acpi_evaluate_integer(handle, "_UID", NULL, &tmp);
  drivers/perf/hisilicon/hisi_uncore_hha_pmu.c:                                          "_UID", NULL, &id);
  drivers/xen/xen-acpi-processor.c:               status = acpi_evaluate_integer(handle, "_UID", NULL, &tmp);
Quoted 20 lines
---
 drivers/pci/pci-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci-acpi.c +1 -1
index a46fec776ad7..068d6745bf98 100644
@@ -67,7 +67,7 @@ static acpi_status acpi_match_rc(acpi_handle handle, u32 lvl, void *context,
 	unsigned long long uid;
 	acpi_status status;
 
-	status = acpi_evaluate_integer(handle, "_UID", NULL, &uid);
+	status = acpi_evaluate_integer(handle, METHOD_NAME__UID, NULL, &uid);
 	if (ACPI_FAILURE(status) || uid != *segment)
 		return AE_CTRL_DEPTH;
 
Signature · 1 line
2.17.1
author
#2 lore raw
Quoted 10 lines · Bjorn Helgaas
Quoted 4 lines · Yipeng Zou

It's convenience to find all at once, use METHOD_NAME__UID as path string.

Fixes 169de969c018 ("PCI/ACPI: Provide acpi_get_rc_resources() for ARM64 platform")

Applied to pci/misc for v6.2, thanks!

I dropped the "Fixes:" tag because there's no reason to backport this to any older kernels.

Quoted 7 lines

I assume you're doing the same for other instances?

   drivers/acpi/acpi_processor.c:          status = acpi_evaluate_integer(handle, "_UID", NULL, &uid);
   drivers/acpi/dock.c:                                    "_UID", NULL, &lbuf);
   drivers/acpi/processor_pdc.c:           status = acpi_evaluate_integer(handle, "_UID", NULL, &tmp);
   drivers/perf/hisilicon/hisi_uncore_hha_pmu.c:                                          "_UID", NULL, &id);
   drivers/xen/xen-acpi-processor.c:               status = acpi_evaluate_integer(handle, "_UID", NULL, &tmp);

yes, there are some other instances, will replace them together.

Quoted 20 lines
Quoted 20 lines
---
  drivers/pci/pci-acpi.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pci-acpi.c +1 -1
index a46fec776ad7..068d6745bf98 100644
@@ -67,7 +67,7 @@ static acpi_status acpi_match_rc(acpi_handle handle, u32 lvl, void *context,
  	unsigned long long uid;
  	acpi_status status;
 
-	status = acpi_evaluate_integer(handle, "_UID", NULL, &uid);
+	status = acpi_evaluate_integer(handle, METHOD_NAME__UID, NULL, &uid);
  	if (ACPI_FAILURE(status) || uid != *segment)
  		return AE_CTRL_DEPTH;
 
Signature · 1 line
2.17.1
Signature · 2 lines
Regards,
Yipeng Zou