Skip to contentSkip to conversation

ASoC: SOF: Fix unused variable warnings

PATCH In review Takashi Iwai 2 participants 5 messages May 8, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 ASoC: SOF: Fix unused variable warnings

Oops, forgot to add to Cc to alsa-devel ML.
Forwarding now.

Takashi

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")

---

Another trivial fix for a bug I see after pulling the second batch.

 sound/soc/sof/core.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/sof/core.c +2 -0
index 5ddbfa8f1a28..32105e0fabe8 100644
@@ -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;
Signature · 1 line
2.16.4
maintainer
#2 lore raw
Quoted 2 lines · Takashi Iwai

Oops, forgot to add to Cc to alsa-devel ML.
Forwarding now.

Forwarding stuff doesn't work with patchwork or with git am and with my scripts using patchwork if things don't hit the list they get delayed by several days :/

#3 lore raw
Quoted 8 lines · Mark Brown
Quoted 2 lines · Takashi Iwai

Oops, forgot to add to Cc to alsa-devel ML.
Forwarding now.

Forwarding stuff doesn't work with patchwork or with git am and with my scripts using patchwork if things don't hit the list they get delayed by several days :/

I mind resubmitting, but I thought it would mind you. OK, will resend in such a case at the next time.

Takashi

maintainer
#4 lore raw
Quoted 8 lines · Takashi Iwai
Quoted 3 lines · Mark Brown

Forwarding stuff doesn't work with patchwork or with git am and with my scripts using patchwork if things don't hit the list they get delayed by several days :/

I mind resubmitting, but I thought it would mind you. OK, will resend in such a case at the next time.

It would've got applied after a few days either way, what I'm doing at the minute is saving patches I want to apply to mailboxes that are then applied by a script. If the script can't find the patch in patchwork it'll give things a few days in case it's been held up by moderation on the list then apply it anyway.

#5 lore raw
Quoted 9 lines · Mark Brown
Quoted 7 lines · Takashi Iwai
Quoted 3 lines · Mark Brown

Forwarding stuff doesn't work with patchwork or with git am and with my scripts using patchwork if things don't hit the list they get delayed by several days :/

I mind resubmitting, but I thought it would mind you.

Gah, I meant I "don't" mind.

Quoted 7 lines
Quoted 1 line

OK, will resend in such a case at the next time.

It would've got applied after a few days either way, what I'm doing at the minute is saving patches I want to apply to mailboxes that are then applied by a script. If the script can't find the patch in patchwork it'll give things a few days in case it's been held up by moderation on the list then apply it anyway.

Heh, good to know about your black magic :)

Takashi