From patchwork Fri May 29 20:04:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11579571 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4A23D159A for ; Fri, 29 May 2020 20:05:55 +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 65E692074D for ; Fri, 29 May 2020 20:05:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Xl+yUpgY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65E692074D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de 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 3C446176A; Fri, 29 May 2020 22:05:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3C446176A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1590782752; bh=rshrMWFxhctd2BrBBIppSogAD3BxbyiW8l8TgwQEE2c=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Xl+yUpgY7ihOveLEiz7Oj2bINrfCB5jV+e5T0zeOTE1JGBtaQwTrb6KswEQ8GFbyS ploH98dPHs5TFMwkKiOfQFIOnh5MeSpsWFwSMr5y3qVpmZ4Z7OH8/Pff6XIsqe4omV p19/W3OJxSJ9ptOOhWFT3VH6UGjDPY0Zp+cM7TAw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9D4C0F800FF; Fri, 29 May 2020 22:05:04 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5C25AF8014E; Fri, 29 May 2020 22:05:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7AEEEF800FF; Fri, 29 May 2020 22:04:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7AEEEF800FF Received: from threadripper.lan ([149.172.98.151]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1M2w0K-1ji3Z20ocG-003PJQ; Fri, 29 May 2020 22:04:36 +0200 From: Arnd Bergmann To: Pierre-Louis Bossart , Liam Girdwood , Ranjani Sridharan , Kai Vehmanen , Daniel Baluta , Mark Brown Subject: [PATCH] ASoC: SOF: Intel: byt: fix unused-function warnings Date: Fri, 29 May 2020 22:04:17 +0200 Message-Id: <20200529200433.19068-1-arnd@arndb.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:jUReMJwwaY6kcLP8d5WAviKG5ZhIsqMuAyesMGtOt6TbqQ87Iry /dlkch7Ztvq4+lIzXoPe+JZcvA4RWdudO1zp4JkU3ktE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on Jie , YueHaibing , Takashi Iwai , linux-kernel@vger.kernel.org, sound-open-firmware@alsa-project.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" Several functions in this driver are only referenced for baytrail-class configurations and building configurations with only merrifield enabled causes a warning: sound/soc/sof/intel/byt.c:447:12: error: unused function 'byt_suspend' [-Werror,-Wunused-function] static int byt_suspend(struct snd_sof_dev *sdev, u32 target_state) ^ sound/soc/sof/intel/byt.c:454:12: error: unused function 'byt_resume' [-Werror,-Wunused-function] static int byt_resume(struct snd_sof_dev *sdev) ^ sound/soc/sof/intel/byt.c:464:12: error: unused function 'byt_remove' [-Werror,-Wunused-function] static int byt_remove(struct snd_sof_dev *sdev) Move these into a corresponding #ifdef section. Fixes: c691f0c6e267 ("ASoC: SOF: Intel: BYT: add .remove op") Fixes: ddcccd543f5d ("ASoC: SOF: Intel: byt: Add PM callbacks") Signed-off-by: Arnd Bergmann --- sound/soc/sof/intel/byt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/sof/intel/byt.c b/sound/soc/sof/intel/byt.c index e6ba8382b1de..6ae62a8a9daf 100644 --- a/sound/soc/sof/intel/byt.c +++ b/sound/soc/sof/intel/byt.c @@ -432,6 +432,7 @@ static void byt_set_mach_params(const struct snd_soc_acpi_mach *mach, mach_params->platform = dev_name(dev); } +#if IS_ENABLED(CONFIG_SND_SOC_SOF_BAYTRAIL) static void byt_reset_dsp_disable_int(struct snd_sof_dev *sdev) { /* Disable Interrupt from both sides */ @@ -467,6 +468,7 @@ static int byt_remove(struct snd_sof_dev *sdev) return 0; } +#endif /* Baytrail DAIs */ static struct snd_soc_dai_driver byt_dai[] = {