From patchwork Mon Mar 29 14:50:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 411761 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1492BC433C1 for ; Mon, 29 Mar 2021 14:52:06 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F1DF61964 for ; Mon, 29 Mar 2021 14:52:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F1DF61964 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 130B41670; Mon, 29 Mar 2021 16:51:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 130B41670 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1617029524; bh=8zkC2ydMW7+gKn6/PFqlwtZa/dy9EfCo4ZFTHUyV9Z4=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=pqiGuMDQeZ4x51BPncqwKwwvayXOyiYDYKmuJ1vH5Luj5RfThICfl6YEgYG5/W+VC QX12848Ll2lisUaQ3IYK+IfFOe9Aqmlhplr3n4kif5b5CGjYWNk4Gyn4pUiR1pDYiV LUlVmGVwGrmdp1xImZOCAihk2/QEQiEn5+FiSMsA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7D232F80157; Mon, 29 Mar 2021 16:51:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4AA0DF8015A; Mon, 29 Mar 2021 16:51:11 +0200 (CEST) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 38EADF800B9 for ; Mon, 29 Mar 2021 16:50:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 38EADF800B9 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4F8Fnn6wQqz9sMm; Mon, 29 Mar 2021 22:48:45 +0800 (CST) Received: from localhost (10.174.179.96) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.498.0; Mon, 29 Mar 2021 22:50:41 +0800 From: YueHaibing To: , , , , Subject: [PATCH -next] ASoC: amd: acp-da7219-max98357a: Fix -Wunused-variable warning Date: Mon, 29 Mar 2021 22:50:37 +0800 Message-ID: <20210329145037.23756-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.179.96] X-CFilter-Loop: Reflected Cc: alsa-devel@alsa-project.org, YueHaibing , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" While ACPI is not set, make W=1 warns: sound/soc/amd/acp-da7219-max98357a.c:684:28: warning: ‘cz_rt5682_card’ defined but not used [-Wunused-variable] static struct snd_soc_card cz_rt5682_card = { ^~~~~~~~~~~~~~ sound/soc/amd/acp-da7219-max98357a.c:671:28: warning: ‘cz_card’ defined but not used [-Wunused-variable] static struct snd_soc_card cz_card = { Use #ifdef block to guard this. Signed-off-by: YueHaibing --- sound/soc/amd/acp-da7219-max98357a.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c index e65e007fc604..1bf0458e22a8 100644 --- a/sound/soc/amd/acp-da7219-max98357a.c +++ b/sound/soc/amd/acp-da7219-max98357a.c @@ -47,13 +47,15 @@ #define DUAL_CHANNEL 2 #define RT5682_PLL_FREQ (48000 * 512) +extern bool bt_uart_enable; +void *acp_soc_is_rltk_max(struct device *dev); + +#ifdef CONFIG_ACPI static struct snd_soc_jack cz_jack; static struct clk *da7219_dai_wclk; static struct clk *da7219_dai_bclk; static struct clk *rt5682_dai_wclk; static struct clk *rt5682_dai_bclk; -extern bool bt_uart_enable; -void *acp_soc_is_rltk_max(struct device *dev); static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd) { @@ -692,6 +694,7 @@ static struct snd_soc_card cz_rt5682_card = { .controls = cz_mc_controls, .num_controls = ARRAY_SIZE(cz_mc_controls), }; +#endif void *acp_soc_is_rltk_max(struct device *dev) {