From: Takashi Iwai Subject: Fwd: [PATCH] ASoC: SOF: Fix unused variable warnings Date: Wed, 08 May 2019 10:52:53 +0200 Message-ID: References: <20190508085037.24773-1-tiwai@suse.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Wed_May__8_10:52:53_2019-1" Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A4B0BF80796 for ; Wed, 8 May 2019 10:52:54 +0200 (CEST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" To: alsa-devel@alsa-project.org Cc: Mark Brown , Pierre-Louis Bossart List-Id: alsa-devel@alsa-project.org --Multipart_Wed_May__8_10:52:53_2019-1 Content-Type: text/plain; charset=US-ASCII Oops, forgot to add to Cc to alsa-devel ML. Forwarding now. Takashi --Multipart_Wed_May__8_10:52:53_2019-1 Content-Type: message/rfc822 From: Takashi Iwai To: Mark Brown Cc: Pierre-Louis Bossart Subject: [PATCH] ASoC: SOF: Fix unused variable warnings Date: Wed, 8 May 2019 10:50:37 +0200 Message-Id: <20190508085037.24773-1-tiwai@suse.de> X-Mailer: git-send-email 2.16.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The recent fix for the build fix caused a couple of unused variable compiler warnings when CONFIG_SND_SOC_SOF_NOCODEC isn't set: sound/soc/sof/core.c:263:6: warning: unused variable ‘ret’ [-Wunused-variable] sound/soc/sof/core.c:262:28: warning: unused variable ‘machine’ [-Wunused-variable] Fix them by adding another ifdef. Fixes: ce38a75089f7 ("ASoC: SOF: core: fix undefined nocodec reference") Signed-off-by: Takashi Iwai --- Another trivial fix for a bug I see after pulling the second batch. sound/soc/sof/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index 5ddbfa8f1a28..32105e0fabe8 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -259,8 +259,10 @@ int snd_sof_create_page_table(struct snd_sof_dev *sdev, static int sof_machine_check(struct snd_sof_dev *sdev) { struct snd_sof_pdata *plat_data = sdev->pdata; +#if IS_ENABLED(CONFIG_SND_SOC_SOF_NOCODEC) struct snd_soc_acpi_mach *machine; int ret; +#endif if (plat_data->machine) return 0; -- 2.16.4 --Multipart_Wed_May__8_10:52:53_2019-1 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --Multipart_Wed_May__8_10:52:53_2019-1--