From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
kernel test robot <lkp@intel.com>,
kai.vehmanen@linux.intel.com,
Bard Liao <yung-chuan.liao@linux.intel.com>,
lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com,
ranjani.sridharan@linux.intel.com, daniel.baluta@nxp.com
Subject: [PATCH 3/4] ASoC: SOF: sof-audio: remove goto used for force-nocodec support
Date: Wed, 30 Sep 2020 18:20:25 +0300 [thread overview]
Message-ID: <20200930152026.3902186-4-kai.vehmanen@linux.intel.com> (raw)
In-Reply-To: <20200930152026.3902186-1-kai.vehmanen@linux.intel.com>
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Address smatch warnings:
sound/soc/sof/sof-audio.c:375 sof_machine_check() warn: inconsistent indenting
sound/soc/sof/sof-audio.c:380 sof_machine_check() warn: ignoring unreachable code.
No functionality change.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
sound/soc/sof/sof-audio.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/sound/soc/sof/sof-audio.c b/sound/soc/sof/sof-audio.c
index afe7e503bf66..9a8ce25a8fc8 100644
--- a/sound/soc/sof/sof-audio.c
+++ b/sound/soc/sof/sof-audio.c
@@ -443,11 +443,7 @@ int sof_machine_check(struct snd_sof_dev *sdev)
struct snd_soc_acpi_mach *mach;
int ret;
- /* force nocodec mode */
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_FORCE_NOCODEC_MODE)
- dev_warn(sdev->dev, "Force to use nocodec mode\n");
- goto nocodec;
-#endif
+#if !IS_ENABLED(CONFIG_SND_SOC_SOF_FORCE_NOCODEC_MODE)
/* find machine */
snd_sof_machine_select(sdev);
@@ -460,8 +456,8 @@ int sof_machine_check(struct snd_sof_dev *sdev)
dev_err(sdev->dev, "error: no matching ASoC machine driver found - aborting probe\n");
return -ENODEV;
#endif
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_FORCE_NOCODEC_MODE)
-nocodec:
+#else
+ dev_warn(sdev->dev, "Force to use nocodec mode\n");
#endif
/* select nocodec mode */
dev_warn(sdev->dev, "Using nocodec machine driver\n");
--
2.27.0
next prev parent reply other threads:[~2020-09-30 15:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 15:20 [PATCH 0/4] ASoC: SOF: cleanups for 5.10 Kai Vehmanen
2020-09-30 15:20 ` [PATCH 1/4] ASoC: SOF: control: remove const in sizeof() Kai Vehmanen
2020-09-30 15:20 ` [PATCH 2/4] ASoC: SOF: topology: " Kai Vehmanen
2020-09-30 15:20 ` Kai Vehmanen [this message]
2020-09-30 15:20 ` [PATCH 4/4] ASoC: SOF: loader: handle all SOF_IPC_EXT types Kai Vehmanen
2020-10-06 7:51 ` [PATCH 0/4] ASoC: SOF: cleanups for 5.10 Jaroslav Kysela
2020-10-24 0:28 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200930152026.3902186-4-kai.vehmanen@linux.intel.com \
--to=kai.vehmanen@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=guennadi.liakhovetski@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=lkp@intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).