mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH v1 1/1] resource: Split DEFINE_RES_NAMED_DESC() out of DEFINE_RES_NAMED()
Date: Mon, 17 Mar 2025 11:50:42 +0200	[thread overview]
Message-ID: <Z9fwciozfh7JK4BC@smile.fi.intel.com> (raw)
In-Reply-To: <20250313160940.414931-1-andriy.shevchenko@linux.intel.com>

+Cc: Andrew.

Andrew, olease, tell me if you want a resend as I just noticed that the header
is orphaned.

Arnd, do we have any plans to have a record in MAINTAINERS for the (currently
orphaned) headers?

On Thu, Mar 13, 2025 at 06:09:40PM +0200, Andy Shevchenko wrote:
> In some cases it would be useful to supply predefined descriptor
> of the resource. For this, introduce DEFINE_RES_NAMED_DESC() macro.
> 
> While at it, provide DEFINE_RES() that takes only start, size,
> and flags.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  include/linux/ioport.h | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/ioport.h b/include/linux/ioport.h
> index f437502224cd..a740aebc372d 100644
> --- a/include/linux/ioport.h
> +++ b/include/linux/ioport.h
> @@ -157,15 +157,20 @@ enum {
>  };
>  
>  /* helpers to define resources */
> -#define DEFINE_RES_NAMED(_start, _size, _name, _flags)			\
> +#define DEFINE_RES_NAMED_DESC(_start, _size, _name, _flags, _desc)	\
>  (struct resource) {							\
>  		.start = (_start),					\
>  		.end = (_start) + (_size) - 1,				\
>  		.name = (_name),					\
>  		.flags = (_flags),					\
> -		.desc = IORES_DESC_NONE,				\
> +		.desc = (_desc),					\
>  	}
>  
> +#define DEFINE_RES_NAMED(_start, _size, _name, _flags)			\
> +	DEFINE_RES_NAMED_DESC(_start, _size, _name, _flags, IORES_DESC_NONE)
> +#define DEFINE_RES(_start, _size, _flags)				\
> +	DEFINE_RES_NAMED(_start, _size, NULL, _flags)
> +
>  #define DEFINE_RES_IO_NAMED(_start, _size, _name)			\
>  	DEFINE_RES_NAMED((_start), (_size), (_name), IORESOURCE_IO)
>  #define DEFINE_RES_IO(_start, _size)					\

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-03-17  9:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13 16:09 Andy Shevchenko
2025-03-17  9:50 ` Andy Shevchenko [this message]
2025-03-17 16:56 ` Andrew Morton
2025-03-17 17:14   ` 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=Z9fwciozfh7JK4BC@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --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®