linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/ACPI: use ACPI Method Name macro directly
@ 2022-11-04  3:24 Yipeng Zou
  2022-11-07 21:24 ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Yipeng Zou @ 2022-11-04  3:24 UTC (permalink / raw)
  To: rafael, lenb, bhelgaas, tn, linux-acpi, linux-pci; +Cc: zouyipeng

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")
Signed-off-by: Yipeng Zou <zouyipeng@huawei.com>
---
 drivers/pci/pci-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index a46fec776ad7..068d6745bf98 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -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;
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI/ACPI: use ACPI Method Name macro directly
  2022-11-04  3:24 [PATCH] PCI/ACPI: use ACPI Method Name macro directly Yipeng Zou
@ 2022-11-07 21:24 ` Bjorn Helgaas
  2022-11-08  1:25   ` Yipeng Zou
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2022-11-07 21:24 UTC (permalink / raw)
  To: Yipeng Zou; +Cc: rafael, lenb, bhelgaas, tn, linux-acpi, linux-pci

On Fri, Nov 04, 2022 at 11:24:30AM +0800, Yipeng Zou wrote:
> 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")
> Signed-off-by: Yipeng Zou <zouyipeng@huawei.com>

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);

> ---
>  drivers/pci/pci-acpi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> index a46fec776ad7..068d6745bf98 100644
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -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;
>  
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PCI/ACPI: use ACPI Method Name macro directly
  2022-11-07 21:24 ` Bjorn Helgaas
@ 2022-11-08  1:25   ` Yipeng Zou
  0 siblings, 0 replies; 3+ messages in thread
From: Yipeng Zou @ 2022-11-08  1:25 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: rafael, lenb, bhelgaas, tn, linux-acpi, linux-pci


在 2022/11/8 5:24, Bjorn Helgaas 写道:
> On Fri, Nov 04, 2022 at 11:24:30AM +0800, Yipeng Zou wrote:
>> 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")
>> Signed-off-by: Yipeng Zou <zouyipeng@huawei.com>
> 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);
yes, there are some other instances, will replace them together.
>> ---
>>   drivers/pci/pci-acpi.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
>> index a46fec776ad7..068d6745bf98 100644
>> --- a/drivers/pci/pci-acpi.c
>> +++ b/drivers/pci/pci-acpi.c
>> @@ -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;
>>   
>> -- 
>> 2.17.1
>>
-- 
Regards,
Yipeng Zou


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-08  1:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-04  3:24 [PATCH] PCI/ACPI: use ACPI Method Name macro directly Yipeng Zou
2022-11-07 21:24 ` Bjorn Helgaas
2022-11-08  1:25   ` Yipeng Zou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).