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 2/4] resource: Replace open coded variant of DEFINE_RES_NAMED_DESC()
Date: Mon, 17 Mar 2025 20:11:11 +0200 [thread overview]
Message-ID: <20250317181412.1560630-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20250317181412.1560630-1-andriy.shevchenko@linux.intel.com>
Replace open coded variant of DEFINE_RES_NAMED_DESC().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
kernel/resource.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index 80d10714cb38..dc9031267942 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -1957,11 +1957,7 @@ __get_free_mem_region(struct resource *base, resource_size_t size,
*/
revoke_iomem(res);
} else {
- res->start = addr;
- res->end = addr + size - 1;
- res->name = name;
- res->desc = desc;
- res->flags = IORESOURCE_MEM;
+ *res = DEFINE_RES_NAMED_DESC(addr, size, name, IORESOURCE_MEM, desc);
/*
* Only succeed if the resource hosts an exclusive
--
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 ` Andy Shevchenko [this message]
2025-03-17 18:11 ` [PATCH v2 3/4] resource: Replace open coded variants of DEFINE_RES_*_NAMED() Andy Shevchenko
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-3-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®