mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: audio-graph-card: fix type mismatch warning
@ 2019-07-12  8:55 Arnd Bergmann
  2019-07-13 12:49 ` Oleksandr Suvorov
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-07-12  8:55 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Arnd Bergmann, Wen Yang, Kuninori Morimoto, alsa-devel, linux-kernel

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 <arnd@arndb.de>
---
 sound/soc/generic/audio-graph-card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index c8abb86afefa..288df245b2f0 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: audio-graph-card: fix type mismatch warning
  2019-07-12  8:55 [PATCH] ASoC: audio-graph-card: fix type mismatch warning Arnd Bergmann
@ 2019-07-13 12:49 ` Oleksandr Suvorov
  0 siblings, 0 replies; 2+ messages in thread
From: Oleksandr Suvorov @ 2019-07-13 12:49 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Liam Girdwood, Mark Brown, Wen Yang, Kuninori Morimoto,
	alsa-devel, linux-kernel

On Fri, 12 Jul 2019 at 11:57, Arnd Bergmann <arnd@arndb.de> wrote:
>
> 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 <arnd@arndb.de>

Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>

> ---
>  sound/soc/generic/audio-graph-card.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
> index c8abb86afefa..288df245b2f0 100644
> --- a/sound/soc/generic/audio-graph-card.c
> +++ b/sound/soc/generic/audio-graph-card.c
> @@ -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
>


-- 
Best regards
Oleksandr Suvorov

Toradex AG
Altsagenstrasse 5 | 6048 Horw/Luzern | Switzerland | T: +41 41 500
4800 (main line)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-13 12:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12  8:55 [PATCH] ASoC: audio-graph-card: fix type mismatch warning Arnd Bergmann
2019-07-13 12:49 ` Oleksandr Suvorov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®