ASoC: audio-graph-card: fix type mismatch warning
PATCH 1/1 ASoC: audio-graph-card: fix type mismatch warning
The new temporary variable is lacks a 'const' annotation:
sound/soc/generic/audio-graph-card.c:87:7: error: assigning to 'u32 *' (aka 'unsigned int *') from 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
Fixes c152f8491a8d ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()")
Signed-off-by Arnd Bergmann <[email protected]>
--- sound/soc/generic/audio-graph-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/generic/audio-graph-card.c +1 -1
@@ -63,7 +63,7 @@ static int graph_get_dai_id(struct device_node *ep)struct device_node *endpoint;struct of_endpoint info;int i, id; -u32 *reg; +const u32 *reg;int ret;/* use driver specified DAI ID if exist */
Signature · 1 line
2.20.0
Quoted 7 lines · Arnd Bergmann
The new temporary variable is lacks a 'const' annotation:
sound/soc/generic/audio-graph-card.c:87:7: error: assigning to 'u32 *' (aka 'unsigned int *') from 'const void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]Fixes c152f8491a8d ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()")Signed-off-by Arnd Bergmann <[email protected]>
Reviewed-by Oleksandr Suvorov <[email protected]>
Quoted 20 lines
--- sound/soc/generic/audio-graph-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/soc/generic/audio-graph-card.c +1
-2@@ -63,7 +63,7 @@ static int graph_get_dai_id(struct device_node *ep)struct device_node *endpoint;struct of_endpoint info;int i, id; -u32 *reg; +const u32 *reg;int ret;/* use driver specified DAI ID if exist */ --2.20.0
Signature · 6 lines
Best regards Oleksandr Suvorov Toradex AG Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41 500 4800 (main line)