From: Takashi Iwai <tiwai@suse.de>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
"Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Scally <djrscally@gmail.com>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
tiwai@suse.com, llvm@lists.linux.dev,
alsa-devel@alsa-project.org,
Nick Desaulniers <ndesaulniers@google.com>
Subject: Re: [PATCH v1 1/1] device property: Replace custom implementation of COUNT_ARGS()
Date: Wed, 20 Sep 2023 17:45:48 +0200 [thread overview]
Message-ID: <87fs38voer.wl-tiwai@suse.de> (raw)
In-Reply-To: <20230920153819.2069869-1-andriy.shevchenko@linux.intel.com>
On Wed, 20 Sep 2023 17:38:19 +0200,
Andy Shevchenko wrote:
>
> Replace custom and non-portable implementation of COUNT_ARGS().
>
> Fixes: e64b674bc9d7 ("software node: implement reference properties")
> Reported-by: Nick Desaulniers <ndesaulniers@google.com>
> Closes: https://lore.kernel.org/r/ZQoILN6QCjzosCOs@google.com
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> include/linux/property.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/property.h b/include/linux/property.h
> index 1684fca930f7..55c2692ffa8c 100644
> --- a/include/linux/property.h
> +++ b/include/linux/property.h
> @@ -10,6 +10,7 @@
> #ifndef _LINUX_PROPERTY_H_
> #define _LINUX_PROPERTY_H_
>
> +#include <linux/args.h>
> #include <linux/bits.h>
> #include <linux/fwnode.h>
> #include <linux/stddef.h>
> @@ -314,7 +315,7 @@ struct software_node_ref_args {
> #define SOFTWARE_NODE_REFERENCE(_ref_, ...) \
> (const struct software_node_ref_args) { \
> .node = _ref_, \
> - .nargs = ARRAY_SIZE(((u64[]){ 0, ##__VA_ARGS__ })) - 1, \
> + .nargs = COUNT_ARGS(__VA_ARGS__), \
> .args = { __VA_ARGS__ }, \
> }
>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
NR_FWNODE_REFERENCE_ARGS is 8, so the COUNT_ARGS() macro should
suffice.
thanks,
Takashi
next prev parent reply other threads:[~2023-09-20 15:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-20 15:38 [PATCH v1 1/1] device property: Replace custom implementation of COUNT_ARGS() Andy Shevchenko
2023-09-20 15:45 ` Takashi Iwai [this message]
2023-09-20 16:50 ` Nick Desaulniers
2023-09-29 16:07 ` Nick Desaulniers
2023-09-29 16:10 ` Nick Desaulniers
2023-09-30 9:38 ` Greg Kroah-Hartman
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=87fs38voer.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=djrscally@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=ndesaulniers@google.com \
--cc=rafael@kernel.org \
--cc=rf@opensource.cirrus.com \
--cc=sakari.ailus@linux.intel.com \
--cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).