Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp688764rwb; Wed, 26 Jul 2023 00:48:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlHFLQyWjcByxF5q+1a3uwsdBcc5WJCbHEorUNXMNk5lPdNbW2mpbOZoMmPg6XNZBJRcbCK+ X-Received: by 2002:a17:902:e846:b0:1b8:b442:aa97 with SMTP id t6-20020a170902e84600b001b8b442aa97mr1265313plg.54.1690357739362; Wed, 26 Jul 2023 00:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690357739; cv=none; d=google.com; s=arc-20160816; b=XusUpZatvGdu/0uVPq/Zsr1M5Mc22OSOwbrDe3OGUzfd8feWFy47qSUOSacl8vUW9j jjlbGqnbQuvUO3E0q2qLWG5t7Tl4Hzy45PoGM21Ag1ElK4S9LxW/NMhh8KI84HNMJwCX ybnDbv0RCnrQbudoSS6l1D1glTqNmjfPhoB84ip8/px4U7MjTDUPyw0JMImXjmwhPIpD DLkLc3B0CWjhjWlMnyn+3T2R+MlYljfgYhL1atp+MOzg6IFMBpFACgFnQG1/Fda2+iO5 QF+JRnibROCR5l8FIZ8oRso5HQkjNNIE0CUB0bWvPZUuNl3RR8C6vbH8SlxRkvuXEv0x 38Bw== 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 :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=xKmoC7w1avaQZLZw1nd7d8Fje+BhvbgbhJZnag/Cd58=; fh=tlhQsCHrraQFumKcUebKiJYFHzNdn5LyZqD7qaeX5g0=; b=E9uS/YdooKiS67Kw1LDJKOkXbLZrfFBMfnLQtdy8l+Fc8NRi2CF2aZUIE+nw9K1r5i 3pO95ge1Pqwxg479t+8LmQSKSU6UeCyveiXCl/1tRw/O268HY+vmRwcBsB6cN8MSNelm Yrk+pQPQCBvl0CZ8PCIHPeKvr92S+XBD/suKyPaVyy9oizKLaSbyoNy++yTi5uSSZksA YDu8Eq02nAhKX8POBCRkTFvbmNcP1QoPrHSO8PjOU52UrNcdfVHv6COMPO8txOhUhC3T uplM/9axLhddTXULENELH5mQXGDh5/8uBAsGxK5u9x5BFyFSXktXdfDCwviueYM23lPR w6fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=HJYPTpA+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t5-20020a170902e84500b001b6aa82743esi13110024plg.271.2023.07.26.00.48.47; Wed, 26 Jul 2023 00:48:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=HJYPTpA+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231710AbjGZHYA (ORCPT + 99 others); Wed, 26 Jul 2023 03:24:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232850AbjGZHXR (ORCPT ); Wed, 26 Jul 2023 03:23:17 -0400 Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 307F23C1D for ; Wed, 26 Jul 2023 00:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1690356063; bh=xKmoC7w1avaQZLZw1nd7d8Fje+BhvbgbhJZnag/Cd58=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=HJYPTpA+UP6KYzhdmVpDWQQYs+jkqxpCC/Enh2FcZuRPv6XOsya/9sEqTWraHSXOF VBZ/7DMcww6N3tkH8Wp7pVSNtI/Lsa68FhPcdMSaCd/OsTf/CIDm5R96x2aEndXxC0 HBMNsFdD9BqGrYWzJ9SyerbopcanNAAphSWKBM6I= Received: from [192.168.124.11] (unknown [61.150.43.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id B4816659A1; Wed, 26 Jul 2023 03:21:01 -0400 (EDT) Message-ID: <174b4c41d10fa1b31821482ec737733ca4633464.camel@xry111.site> Subject: Re: [PATCH] ASoC: loongson: mark OF related data as maybe unused From: Xi Ruoyao To: YingKun Meng , broonie@kernel.org, lgirdwood@gmail.com Cc: krzysztof.kozlowski@linaro.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, loongson-kernel@lists.loongnix.cn, kernel test robot Date: Wed, 26 Jul 2023 15:20:59 +0800 In-Reply-To: <20230726070648.700754-1-mengyingkun@loongson.cn> References: <20230726070648.700754-1-mengyingkun@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2023-07-26 at 15:06 +0800, YingKun Meng wrote: > The ASoC Sound Card driver can be compile tested with !CONFIG_OF > making 'loongson_asoc_dt_ids' unused: >=20 > sound/soc/loongson/loongson_card.c:200:34: warning: unused variable > 'loongson_asoc_dt_ids' [-Wunused-const-variable] Hmm, why not guard the definition with #ifdef CONFIG_OF instead? Source text is first and foremost for the human reader, not for the compiler, and an ifdef clearly shows the condition when the definition is not used. > Here we solve it in the same way as [1]. >=20 > [1] https://lore.kernel.org/all/20201125164452.89239-1-krzk@kernel.org/ >=20 > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202307242008.xqdjgk04-lkp@i= ntel.com > Fixes: d24028606e76 ("ASoC: loongson: Add Loongson ASoC Sound Card Suppor= t") > Signed-off-by: YingKun Meng > --- > =C2=A0sound/soc/loongson/loongson_card.c | 2 +- > =C2=A01 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/sound/soc/loongson/loongson_card.c b/sound/soc/loongson/loon= gson_card.c > index 9ded16329747..7dd7adc13484 100644 > --- a/sound/soc/loongson/loongson_card.c > +++ b/sound/soc/loongson/loongson_card.c > @@ -197,7 +197,7 @@ static int loongson_asoc_card_probe(struct platform_d= evice *pdev) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return ret; > =C2=A0} > =C2=A0 > -static const struct of_device_id loongson_asoc_dt_ids[] =3D { > +static const struct of_device_id loongson_asoc_dt_ids[] __maybe_unused = =3D { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ .compatible =3D "loongs= on,ls-audio-card" }, > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0{ /* sentinel */ }, > =C2=A0}; --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University