projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bce0056
)
ASoC: soc-core: cleanup cppcheck warning at snd_soc_daifmt_parse_format()
author
Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com>
Thu, 29 Jul 2021 01:15:42 +0000
(10:15 +0900)
committer
Mark Brown
<broonie@kernel.org>
Thu, 29 Jul 2021 14:35:41 +0000
(15:35 +0100)
This patch cleanups below cppcheck warning.
sound/soc/soc-core.c:3056:11: style: The scope of the variable 'i' can be reduced. [variableScope]
int ret, i;
^
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link:
https://lore.kernel.org/r/87tukdyl6p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/soc/soc-core.c
b/sound/soc/soc-core.c
index 6889380a98fc8d4ae7bf063cebc6691da9004c81..d4e3a6c5b5bb30c194b8d361da0f3383e4f2973e 100644
(file)
--- a/
sound/soc/soc-core.c
+++ b/
sound/soc/soc-core.c
@@
-3054,7
+3054,7
@@
EXPORT_SYMBOL_GPL(snd_soc_daifmt_clock_provider_from_bitmap);
unsigned int snd_soc_daifmt_parse_format(struct device_node *np,
const char *prefix)
{
- int ret
, i
;
+ int ret;
char prop[128];
unsigned int format = 0;
int bit, frame;
@@
-3088,6
+3088,8
@@
unsigned int snd_soc_daifmt_parse_format(struct device_node *np,
ret = of_property_read_string(np, prop, &str);
}
if (ret == 0) {
+ int i;
+
for (i = 0; i < ARRAY_SIZE(of_fmt_table); i++) {
if (strcmp(str, of_fmt_table[i].name) == 0) {
format |= of_fmt_table[i].val;