From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andy@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH v2 3/4] resource: Replace open coded variants of DEFINE_RES_*_NAMED()
Date: Mon, 17 Mar 2025 20:11:12 +0200 [thread overview]
Message-ID: <20250317181412.1560630-4-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20250317181412.1560630-1-andriy.shevchenko@linux.intel.com>
Replace open coded variants of DEFINE_RES_*_NAMED().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
kernel/resource.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index dc9031267942..a30a32b47e0e 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -1728,18 +1728,13 @@ static int __init reserve_setup(char *str)
* I/O port space; otherwise assume it's memory.
*/
if (io_start < 0x10000) {
- res->flags = IORESOURCE_IO;
+ *res = DEFINE_RES_IO_NAMED(io_start, io_num, "reserved");
parent = &ioport_resource;
} else {
- res->flags = IORESOURCE_MEM;
+ *res = DEFINE_RES_MEM_NAMED(io_start, io_num, "reserved");
parent = &iomem_resource;
}
- res->name = "reserved";
- res->start = io_start;
- res->end = io_start + io_num - 1;
res->flags |= IORESOURCE_BUSY;
- res->desc = IORES_DESC_NONE;
- res->child = NULL;
if (request_resource(parent, res) == 0)
reserved = x+1;
}
--
2.47.2
next prev parent reply other threads:[~2025-03-17 18:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-17 18:11 [PATCH v2 0/4] resource: Split and use DEFINE_RES*() macros Andy Shevchenko
2025-03-17 18:11 ` [PATCH v2 1/4] resource: Split DEFINE_RES_NAMED_DESC() out of DEFINE_RES_NAMED() Andy Shevchenko
2025-03-17 18:11 ` [PATCH v2 2/4] resource: Replace open coded variant of DEFINE_RES_NAMED_DESC() Andy Shevchenko
2025-03-17 18:11 ` Andy Shevchenko [this message]
2025-03-17 18:11 ` [PATCH v2 4/4] resource: Replace open coded variant of DEFINE_RES() Andy Shevchenko
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=20250317181412.1560630-4-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=andy@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
/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®