All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH 02/12] ASoC: soc-dapm: cleanup cppcheck warning at dapm_connect_mux()
Date: 05 Aug 2021 10:11:00 +0900	[thread overview]
Message-ID: <87wnp0u257.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87zgtwu25w.wl-kuninori.morimoto.gx@renesas.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

This patch cleanups below cppcheck warning.

sound/soc/soc-dapm.c:751:15: style: The scope of the variable 'val' can be reduced. [variableScope]
 unsigned int val, item;
              ^

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/soc-dapm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 92193e9e1084..1c0457715008 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -747,10 +747,11 @@ static int dapm_connect_mux(struct snd_soc_dapm_context *dapm,
 {
 	const struct snd_kcontrol_new *kcontrol = &w->kcontrol_news[0];
 	struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
-	unsigned int val, item;
+	unsigned int item;
 	int i;
 
 	if (e->reg != SND_SOC_NOPM) {
+		unsigned int val;
 		val = soc_dapm_read(dapm, e->reg);
 		val = (val >> e->shift_l) & e->mask;
 		item = snd_soc_enum_val_to_item(e, val);
-- 
2.25.1


  parent reply	other threads:[~2021-08-05  1:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05  1:10 [PATCH 00/12] ASoC: soc-dapm: cleanup cppcheck warning Kuninori Morimoto
2021-08-05  1:10 ` [PATCH 01/12] ASoC: soc-dapm: cleanup cppcheck warning at dapm_wcache_lookup() Kuninori Morimoto
2021-08-05  1:11 ` Kuninori Morimoto [this message]
2021-08-05  1:11 ` [PATCH 03/12] ASoC: soc-dapm: cleanup cppcheck warning at dapm_set_mixer_path_status() Kuninori Morimoto
2021-08-05  1:11 ` [PATCH 04/12] ASoC: soc-dapm: cleanup cppcheck warning at dapm_new_pga() Kuninori Morimoto
2021-08-05  1:11 ` [PATCH 05/12] ASoC: soc-dapm: cleanup cppcheck warning at dapm_new_dai_link() Kuninori Morimoto
2021-08-05  1:11 ` [PATCH 06/12] ASoC: soc-dapm: cleanup cppcheck warning at dapm_seq_check_event() Kuninori Morimoto
2021-08-05  1:11 ` [PATCH 07/12] ASoC: soc-dapm: cleanup cppcheck warning at dapm_seq_run() Kuninori Morimoto
2021-08-05  1:11 ` [PATCH 08/12] ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_del_route() Kuninori Morimoto
2021-08-05  1:11 ` [PATCH 09/12] ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_add_routes() Kuninori Morimoto
2021-08-05  1:11 ` [PATCH 10/12] ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_weak_routes() Kuninori Morimoto
2021-08-05  1:11 ` [PATCH 11/12] ASoC: soc-dapm: cleanup cppcheck warning at snd_soc_dapm_new_controls() Kuninori Morimoto
2021-08-05  1:11 ` [PATCH 12/12] ASoC: soc-dapm: cleanup cppcheck warning at soc_dapm_dai_stream_event() Kuninori Morimoto
2021-08-06  0:47 ` [PATCH 00/12] ASoC: soc-dapm: cleanup cppcheck warning 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=87wnp0u257.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.