From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1E2FC04AAD for ; Wed, 20 Sep 2023 15:45:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236765AbjITPp7 (ORCPT ); Wed, 20 Sep 2023 11:45:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235535AbjITPp4 (ORCPT ); Wed, 20 Sep 2023 11:45:56 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 092BCAF; Wed, 20 Sep 2023 08:45:51 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8BB5122043; Wed, 20 Sep 2023 15:45:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695224749; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jT8POAt+6a+cyjo2/WeyeI4/wNaD3Ch0j26LYY819mk=; b=TJ9SSn8vujr8m77E4OuabEEKVgvsPZDNotcQSXeftPSM9+XgXq0XTWd6oQUp26cx2HUc8K VJK4gMUdxTrWHLzPwBMEEwSslWYZ7CsrZfOIWwHHk09U5j9EEURc6GgfyTVh638C4fFcG+ jsagTn2vTcWKB1CYPEmtmSGzdJL+U1A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695224749; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jT8POAt+6a+cyjo2/WeyeI4/wNaD3Ch0j26LYY819mk=; b=wLwpOj8Vb+JFA5RHup2roNKkyLwOl9ooc22go3ym3s8PWDgXJPS8CkMnjaf5ZhZKVQksIq RB6cwzuoAZMF4+AA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 4441D132C7; Wed, 20 Sep 2023 15:45:49 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id txK3D60TC2WNTwAAMHmgww (envelope-from ); Wed, 20 Sep 2023 15:45:49 +0000 Date: Wed, 20 Sep 2023 17:45:48 +0200 Message-ID: <87fs38voer.wl-tiwai@suse.de> From: Takashi Iwai To: Andy Shevchenko Cc: Greg Kroah-Hartman , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Daniel Scally , Heikki Krogerus , Sakari Ailus , Richard Fitzgerald , tiwai@suse.com, llvm@lists.linux.dev, alsa-devel@alsa-project.org, Nick Desaulniers Subject: Re: [PATCH v1 1/1] device property: Replace custom implementation of COUNT_ARGS() In-Reply-To: <20230920153819.2069869-1-andriy.shevchenko@linux.intel.com> References: <20230920153819.2069869-1-andriy.shevchenko@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Closes: https://lore.kernel.org/r/ZQoILN6QCjzosCOs@google.com > Signed-off-by: Andy Shevchenko > --- > 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 > #include > #include > #include > @@ -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 NR_FWNODE_REFERENCE_ARGS is 8, so the COUNT_ARGS() macro should suffice. thanks, Takashi