From patchwork Fri May 6 02:26:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 12840480 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A77E7C433EF for ; Fri, 6 May 2022 02:27:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=TWpQz9H0mOh8dp3xSkquB/h3ccfD7l3IWkOyb42Vd+c=; b=A3MXKdlJzFYK4+ VEK5m2WcRIg5de1kLWLX1+0su4TQ1EiD6y06w0fJKskTD6FleMFKNfSYaV4MK1GPpoEzsUwjgNsZj tHPPe0FzKs/+HwCzNGC9cMTTN1dcR0M5nMgYrYxmKCoWvli0AlMOi6hCan2EPX7wXzrqPo4ivTWrs bjtfXqF77rLuB7M3tFH6i7Crdhltazg+b0tko4SFneSZGJgYvkb+yhi7kiTqQoMQBhJ1uLwZuy1y/ jy6EQDhj+5uOEodW8q+g2jr88lbdSVX79zuwDSWz1DES0VLpZIm7LX1wnpB8sgV1FvYwDVNvRGRzA l5QKQm5HZKktPMntCsXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmngI-000yNc-Sv; Fri, 06 May 2022 02:26:58 +0000 Received: from szxga03-in.huawei.com ([45.249.212.189]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmng7-000yK0-RJ; Fri, 06 May 2022 02:26:49 +0000 Received: from canpemm500007.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4KvZ854dLhzNkTG; Fri, 6 May 2022 10:21:57 +0800 (CST) Received: from localhost (10.174.179.215) by canpemm500007.china.huawei.com (7.192.104.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 6 May 2022 10:26:39 +0800 From: YueHaibing To: , , , , , , , CC: , , , , YueHaibing Subject: [PATCH -next] ASoC: mediatek: mt8195: Fix build warning without CONFIG_OF Date: Fri, 6 May 2022 10:26:38 +0800 Message-ID: <20220506022638.15864-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.179.215] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500007.china.huawei.com (7.192.104.62) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_192648_072149_27546407 X-CRM114-Status: GOOD ( 10.28 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org sound/soc/mediatek/mt8195/mt8195-mt6359.c:1639:32: warning: ‘mt8195_mt6359_max98390_rt5682_card’ defined but not used [-Wunused-variable] 1639 | static struct mt8195_card_data mt8195_mt6359_max98390_rt5682_card = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/mediatek/mt8195/mt8195-mt6359.c:1634:32: warning: ‘mt8195_mt6359_rt1011_rt5682_card’ defined but not used [-Wunused-variable] 1634 | static struct mt8195_card_data mt8195_mt6359_rt1011_rt5682_card = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/mediatek/mt8195/mt8195-mt6359.c:1629:32: warning: ‘mt8195_mt6359_rt1019_rt5682_card’ defined but not used [-Wunused-variable] 1629 | static struct mt8195_card_data mt8195_mt6359_rt1019_rt5682_card = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ These variables is only used with CONFIG_OF, move it into the ifdef block. Fixes: 86a6b9c9dfff ("ASoC: mediatek: mt8195: add machine support for max98390 and rt5682") Signed-off-by: YueHaibing --- sound/soc/mediatek/mt8195/mt8195-mt6359.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c index 3e32fe801b3c..f90675f14d60 100644 --- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c +++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c @@ -1626,6 +1626,7 @@ static int mt8195_mt6359_dev_probe(struct platform_device *pdev) return ret; } +#ifdef CONFIG_OF static struct mt8195_card_data mt8195_mt6359_rt1019_rt5682_card = { .name = "mt8195_r1019_5682", .quirk = RT1019_SPEAKER_AMP_PRESENT, @@ -1641,7 +1642,6 @@ static struct mt8195_card_data mt8195_mt6359_max98390_rt5682_card = { .quirk = MAX98390_SPEAKER_AMP_PRESENT, }; -#ifdef CONFIG_OF static const struct of_device_id mt8195_mt6359_dt_match[] = { { .compatible = "mediatek,mt8195_mt6359_rt1019_rt5682",