diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2021-08-03 08:00:55 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-08-03 20:27:13 +0300 |
commit | b1ebecb90bf69fbd288e873bbf545061f5a6c144 (patch) | |
tree | c34eacd38b1a54164b00149c4742dd54c0a4d264 /sound/soc/soc-ops.c | |
parent | 872040f7980b929d75877e7b9d721ea808ce06e1 (diff) | |
download | linux-b1ebecb90bf69fbd288e873bbf545061f5a6c144.tar.xz |
ASoC: soc-ops: cleanup cppcheck warning at snd_soc_get_xr_sx()
This patch cleanups below cppcheck warning.
sound/soc/soc-ops.c:814:15: style: The scope of the variable 'regval' can be reduced. [variableScope]
unsigned int regval;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871r7bw29k.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-ops.c')
-rw-r--r-- | sound/soc/soc-ops.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index 11be75f25300..93bb8bc5ae33 100644 --- a/sound/soc/soc-ops.c +++ b/sound/soc/soc-ops.c @@ -812,11 +812,10 @@ int snd_soc_get_xr_sx(struct snd_kcontrol *kcontrol, long min = mc->min; long max = mc->max; long val = 0; - unsigned int regval; unsigned int i; for (i = 0; i < regcount; i++) { - regval = snd_soc_component_read(component, regbase+i); + unsigned int regval = snd_soc_component_read(component, regbase+i); val |= (regval & regwmask) << (regwshift*(regcount-i-1)); } val &= mask; |