public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] ACPI: scan: Use resource_type() for resource type checking
@ 2025-12-30  9:57 Rafael J. Wysocki
  2025-12-30 11:28 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2025-12-30  9:57 UTC (permalink / raw)
  To: Linux ACPI
  Cc: LKML, Bjorn Helgaas, Zhang Rui, Chen Yu, Andy Shevchenko,
	Mika Westerberg, Linux PCI, Alex Hung, Hans de Goede,
	Ilpo Järvinen, platform-driver-x86, AceLan Kao

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

To follow a well-established existing pattern, use resource_type() for
resource type checking in acpi_scan_claim_resources().

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

This is a follow-up to

https://lore.kernel.org/linux-acpi/7888874.EvYhyI6sBW@rafael.j.wysocki/

which is present in linux-next.

---
 drivers/acpi/scan.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -2624,7 +2624,7 @@ static void acpi_scan_claim_resources(st
 		if ((res->flags & IORESOURCE_DISABLED) || res->end < res->start)
 			continue;
 
-		if (res->flags & IORESOURCE_IO) {
+		if (resource_type(res) == IORESOURCE_IO) {
 			/*
 			 * Follow the PNP system driver and on x86 skip I/O
 			 * resources that start below 0x100 (the "standard PC
@@ -2635,7 +2635,7 @@ static void acpi_scan_claim_resources(st
 				continue;
 			}
 			r = request_region(res->start, resource_size(res), regionid);
-		} else if (res->flags & IORESOURCE_MEM) {
+		} else if (resource_type(res) == IORESOURCE_MEM) {
 			r = request_mem_region(res->start, resource_size(res), regionid);
 		} else {
 			continue;




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

* Re: [PATCH v1] ACPI: scan: Use resource_type() for resource type checking
  2025-12-30  9:57 [PATCH v1] ACPI: scan: Use resource_type() for resource type checking Rafael J. Wysocki
@ 2025-12-30 11:28 ` Andy Shevchenko
  2025-12-30 11:53 ` Ilpo Järvinen
  2026-01-02 11:56 ` Jonathan Cameron
  2 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2025-12-30 11:28 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux ACPI, LKML, Bjorn Helgaas, Zhang Rui, Chen Yu,
	Mika Westerberg, Linux PCI, Alex Hung, Hans de Goede,
	Ilpo Järvinen, platform-driver-x86, AceLan Kao

On Tue, Dec 30, 2025 at 10:57:34AM +0100, Rafael J. Wysocki wrote:

> To follow a well-established existing pattern, use resource_type() for
> resource type checking in acpi_scan_claim_resources().
> 
> No intentional functional impact.

Thanks for this!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>


-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1] ACPI: scan: Use resource_type() for resource type checking
  2025-12-30  9:57 [PATCH v1] ACPI: scan: Use resource_type() for resource type checking Rafael J. Wysocki
  2025-12-30 11:28 ` Andy Shevchenko
@ 2025-12-30 11:53 ` Ilpo Järvinen
  2026-01-02 11:56 ` Jonathan Cameron
  2 siblings, 0 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2025-12-30 11:53 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux ACPI, LKML, Bjorn Helgaas, Zhang Rui, Chen Yu,
	Andy Shevchenko, Mika Westerberg, Linux PCI, Alex Hung,
	Hans de Goede, platform-driver-x86, AceLan Kao

[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]

On Tue, 30 Dec 2025, Rafael J. Wysocki wrote:

> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> To follow a well-established existing pattern, use resource_type() for
> resource type checking in acpi_scan_claim_resources().
> 
> No intentional functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> 
> This is a follow-up to
> 
> https://lore.kernel.org/linux-acpi/7888874.EvYhyI6sBW@rafael.j.wysocki/
> 
> which is present in linux-next.
> 
> ---
>  drivers/acpi/scan.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -2624,7 +2624,7 @@ static void acpi_scan_claim_resources(st
>  		if ((res->flags & IORESOURCE_DISABLED) || res->end < res->start)
>  			continue;
>  
> -		if (res->flags & IORESOURCE_IO) {
> +		if (resource_type(res) == IORESOURCE_IO) {
>  			/*
>  			 * Follow the PNP system driver and on x86 skip I/O
>  			 * resources that start below 0x100 (the "standard PC
> @@ -2635,7 +2635,7 @@ static void acpi_scan_claim_resources(st
>  				continue;
>  			}
>  			r = request_region(res->start, resource_size(res), regionid);
> -		} else if (res->flags & IORESOURCE_MEM) {
> +		} else if (resource_type(res) == IORESOURCE_MEM) {
>  			r = request_mem_region(res->start, resource_size(res), regionid);
>  		} else {
>  			continue;
> 
> 
> 

Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

-- 
 i.

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

* Re: [PATCH v1] ACPI: scan: Use resource_type() for resource type checking
  2025-12-30  9:57 [PATCH v1] ACPI: scan: Use resource_type() for resource type checking Rafael J. Wysocki
  2025-12-30 11:28 ` Andy Shevchenko
  2025-12-30 11:53 ` Ilpo Järvinen
@ 2026-01-02 11:56 ` Jonathan Cameron
  2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2026-01-02 11:56 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux ACPI, LKML, Bjorn Helgaas, Zhang Rui, Chen Yu,
	Andy Shevchenko, Mika Westerberg, Linux PCI, Alex Hung,
	Hans de Goede, Ilpo Järvinen, platform-driver-x86,
	AceLan Kao

On Tue, 30 Dec 2025 10:57:34 +0100
"Rafael J. Wysocki" <rafael@kernel.org> wrote:

> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> To follow a well-established existing pattern, use resource_type() for
> resource type checking in acpi_scan_claim_resources().
> 
> No intentional functional impact.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>



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

end of thread, other threads:[~2026-01-02 11:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-30  9:57 [PATCH v1] ACPI: scan: Use resource_type() for resource type checking Rafael J. Wysocki
2025-12-30 11:28 ` Andy Shevchenko
2025-12-30 11:53 ` Ilpo Järvinen
2026-01-02 11:56 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox