mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Bjorn Helgaas" <helgaas@kernel.org>,
	"Zhang Rui" <rui.zhang@intel.com>,
	"Chen Yu" <yu.c.chen@intel.com>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Linux PCI" <linux-pci@vger.kernel.org>,
	"Alex Hung" <alexhung@gmail.com>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	platform-driver-x86@vger.kernel.org,
	"AceLan Kao" <acelan.kao@canonical.com>
Subject: [PATCH v1] ACPI: scan: Use resource_type() for resource type checking
Date: Tue, 30 Dec 2025 10:57:34 +0100	[thread overview]
Message-ID: <12814730.O9o76ZdvQC@rafael.j.wysocki> (raw)

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;




             reply	other threads:[~2025-12-30  9:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-30  9:57 Rafael J. Wysocki [this message]
2025-12-30 11:28 ` Andy Shevchenko
2025-12-30 11:53 ` Ilpo Järvinen
2026-01-02 11:56 ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12814730.O9o76ZdvQC@rafael.j.wysocki \
    --to=rafael@kernel.org \
    --cc=acelan.kao@canonical.com \
    --cc=alexhung@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hansg@kernel.org \
    --cc=helgaas@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=yu.c.chen@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®