From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
linux-kernel@vger.kernel.org,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: Re: [PATCH v2] resource: provide 0args DEFINE_RES variant for unset resource desc
Date: Sun, 28 Dec 2025 20:14:46 +0200 [thread overview]
Message-ID: <aVFzll3-sH1m_KGT@smile.fi.intel.com> (raw)
In-Reply-To: <20251213115314.16700-1-ansuelsmth@gmail.com>
On Sat, Dec 13, 2025 at 12:53:09PM +0100, Christian Marangi wrote:
> Provide a variant of DEFINE_RES that takes 0 arguments to initialize an
> "unset" resource descriptor.
>
> This should be used for the improper case of
>
> struct resource res = {};
>
> where DEFINE_RES() should be used.
>
> With this new helper variant, it would result in:
>
> struct resource res = DEFINE_RES();
>
> instead of having to define the full 3 arguments:
>
> struct resource res = DEFINE_RES(0, 0, IORESOURCE_UNSET);
>
> DEFINE_RES() with no args, will set the flags to IORESOURCE_UNSET
> signaling the resource descriptor is UNSET and doesn't reflect an actual
> resource currently.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2025-12-28 18:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-13 11:53 Christian Marangi
2025-12-28 18:14 ` Andy Shevchenko [this message]
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=aVFzll3-sH1m_KGT@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=ansuelsmth@gmail.com \
--cc=bhelgaas@google.com \
--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®