[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87fs38voer.wl-tiwai@suse.de>
Date: Wed, 20 Sep 2023 17:45:48 +0200
From: Takashi Iwai <tiwai@...e.de>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
"Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Richard Fitzgerald <rf@...nsource.cirrus.com>, tiwai@...e.com,
llvm@...ts.linux.dev, alsa-devel@...a-project.org,
Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH v1 1/1] device property: Replace custom implementation of COUNT_ARGS()
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@...gle.com>
> Closes: https://lore.kernel.org/r/ZQoILN6QCjzosCOs@google.com
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.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@...e.de>
NR_FWNODE_REFERENCE_ARGS is 8, so the COUNT_ARGS() macro should
suffice.
thanks,
Takashi
Powered by blists - more mailing lists