Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1563109rdb; Wed, 20 Sep 2023 12:41:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhOwwE8c4FRukShRkmNQgQqlGx/MN3lS5Nvpg2RQXoN1+TW6EdpNerjEbMHfZjSVbsXtZR X-Received: by 2002:a05:6a20:9717:b0:157:e67c:6f with SMTP id hr23-20020a056a20971700b00157e67c006fmr2601670pzc.55.1695238907698; Wed, 20 Sep 2023 12:41:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695238907; cv=none; d=google.com; s=arc-20160816; b=L3thFh9vv3tn0eBGtMdi99jFSuwqMHRvA7NOdHV/iTSws7FIr9RIF+DD+H7dwbzd9A lmTISUQJZOie5g80zrjMg/FgBEV2WffbRpHOslVvkW5Ek5rmH4PdTihBYJ+GufgBjpkA KXQGbjRBiExV9UkREK2wOSv7fBfLzXIdAYoOtlKIzmPMzP8fOC/wNVMXXArS1khxKw28 hPtNPKGuIlYYk0I0gWqxa+8LbzkP/2uFpwUtxr9Ou0c8D5ddjep+QnYAOComKhVSDtPr 7hIKF1HGqVYFdmnWEs94MoLG+PO8dC89PZsjL5ZwsCsmm098WLolb5AwYwunN20fU9Fa uuMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=jT8POAt+6a+cyjo2/WeyeI4/wNaD3Ch0j26LYY819mk=; fh=H0VGW+0PGxBUtz1gzAVc46F6zT/05iT+lJrVGidH3OA=; b=l6VvSDRIrmTSDCgEBkrvdEO88LAmTGeijSomHT++3uuQyl6ZOFFa7tCy3sgGNUTB/1 CLXd/EOGn966QWRO/G3bIGfsIlHD1gYjDvsZlRtKAbSsZSPF4RQdYpVUbfnR5JTVFWxb z8OJWZv/JWDvQ7mZ7LqVofr+orfUpzrmyfRhXI9H7fJjwnht3sFNYmhi8DxY9xFSXlQV 91dmZQ6EB2LFitrap6U9Q+5gsi1yezOSu7OyFNCNswSuPFPf9o90mtyLy1m2KGZAQaCR q1dtSVbJZZOj+0/Vmfy0EvVN5V7S5S+A9XdIvn4gNxmfHXTKmYgQ319rd3pvlscPjzCz hrxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=TJ9SSn8v; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=wLwpOj8V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id p6-20020a17090ac00600b002682c370e32si1998728pjt.188.2023.09.20.12.41.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 12:41:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=TJ9SSn8v; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=wLwpOj8V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2A407824C4F6; Wed, 20 Sep 2023 08:46:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236751AbjITPp5 (ORCPT + 99 others); Wed, 20 Sep 2023 11:45:57 -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 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 08:46:15 -0700 (PDT) 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