Skip to contentSkip to conversation

ACPI: scan: Use resource_type() for resource type checking

PATCH In review Rafael J. Wysocki 4 participants 4 messages Dec 30, 2025 – Jan 2

Subsystems (3)
lore
Share & tools
lore

Rafael J. Wysocki

author maintainer
#0 lore raw

PATCH 1/1 ACPI: scan: Use resource_type() for resource type checking

From: Rafael J. Wysocki <[email protected]>

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

No intentional functional impact.

---

This is a follow-up to

https://lore.kernel.org/linux-acpi/[email protected]/

which is present in linux-next.

---
 drivers/acpi/scan.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/scan.c +2 -2
@@ -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 on v1 1/1
#1 lore raw
Quoted 4 lines · Rafael J. Wysocki

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!

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Rafael J. Wysocki
Quoted 35 lines · Rafael J. Wysocki

From: Rafael J. Wysocki <[email protected]>

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

No intentional functional impact.

---

This is a follow-up to

https://lore.kernel.org/linux-acpi/[email protected]/

which is present in linux-next.

---
 drivers/acpi/scan.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/scan.c +1 -1
@@ -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

drivers/acpi/scan.c static void acpi_scan_claim_resources(st · line 2641

Quoted 8 lines
drivers/acpi/scan.c +1 -1
@@ -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;
Signature · 1 line
 i.
Reviewed-by on v1 1/1
#3 lore raw
In reply to Rafael J. Wysocki
Quoted 8 lines · On Tue, 30 Dec 2025 10:57:34 +0100 "Rafael J. Wysocki" <[email protected]>…

From: Rafael J. Wysocki <[email protected]>

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

No intentional functional impact.