* [PATCH] ASoC: audio-graph-card: add missing const at graph_get_dai_id()
@ 2019-07-11 4:10 Kuninori Morimoto
2019-07-11 4:34 ` wen.yang99
2019-07-11 11:58 ` Applied "ASoC: audio-graph-card: add missing const at graph_get_dai_id()" to the asoc tree Mark Brown
0 siblings, 2 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2019-07-11 4:10 UTC (permalink / raw)
To: Mark Brown; +Cc: Linux-ALSA, Wen Yang
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
commit c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in
graph_get_dai_id()") fixups use-after-free issue,
but, it need to use "const" for reg. This patch adds it.
We will have below without this patch
LINUX/sound/soc/generic/audio-graph-card.c: In function 'graph_get_dai_id':
LINUX/sound/soc/generic/audio-graph-card.c:87:7: warning: assignment discards\
'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
reg = of_get_property(node, "reg", NULL);
Fixes: c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.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 343ede8..ebf2ca3 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.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC: audio-graph-card: add missing const at graph_get_dai_id()
2019-07-11 4:10 [PATCH] ASoC: audio-graph-card: add missing const at graph_get_dai_id() Kuninori Morimoto
@ 2019-07-11 4:34 ` wen.yang99
2019-07-11 11:58 ` Applied "ASoC: audio-graph-card: add missing const at graph_get_dai_id()" to the asoc tree Mark Brown
1 sibling, 0 replies; 5+ messages in thread
From: wen.yang99 @ 2019-07-11 4:34 UTC (permalink / raw)
To: kuninori.morimoto.gx; +Cc: alsa-devel, broonie
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> commit c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in
> graph_get_dai_id()") fixups use-after-free issue,
> but, it need to use "const" for reg. This patch adds it.
>
> We will have below without this patch
>
> LINUX/sound/soc/generic/audio-graph-card.c: In function 'graph_get_dai_id':
> LINUX/sound/soc/generic/audio-graph-card.c:87:7: warning: assignment discards\
> 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> reg = of_get_property(node, "reg", NULL);
>
> Fixes: c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()")
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.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 343ede8..ebf2ca3 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.7.4
Thanks.
Acked-by: Wen Yang <wen.yang99@zte.com.cn>
---
Best regards
Wen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Applied "ASoC: audio-graph-card: add missing const at graph_get_dai_id()" to the asoc tree
2019-07-11 4:10 [PATCH] ASoC: audio-graph-card: add missing const at graph_get_dai_id() Kuninori Morimoto
2019-07-11 4:34 ` wen.yang99
@ 2019-07-11 11:58 ` Mark Brown
2019-07-12 7:45 ` Kuninori Morimoto
1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2019-07-11 11:58 UTC (permalink / raw)
To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown, Wen Yang
The patch
ASoC: audio-graph-card: add missing const at graph_get_dai_id()
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From ec3042ad39d4e2ddbc3a3344f90bb10d8feb53bc Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu, 11 Jul 2019 13:10:45 +0900
Subject: [PATCH] ASoC: audio-graph-card: add missing const at
graph_get_dai_id()
commit c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in
graph_get_dai_id()") fixups use-after-free issue,
but, it need to use "const" for reg. This patch adds it.
We will have below without this patch
LINUX/sound/soc/generic/audio-graph-card.c: In function 'graph_get_dai_id':
LINUX/sound/soc/generic/audio-graph-card.c:87:7: warning: assignment discards\
'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
reg = of_get_property(node, "reg", NULL);
Fixes: c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Wen Yang <wen.yang99@zte.com.cn>
Link: https://lore.kernel.org/r/87sgrd43ja.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
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 343ede8042c3..ebf2ca3249cb 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.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-12 10:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11 4:10 [PATCH] ASoC: audio-graph-card: add missing const at graph_get_dai_id() Kuninori Morimoto
2019-07-11 4:34 ` wen.yang99
2019-07-11 11:58 ` Applied "ASoC: audio-graph-card: add missing const at graph_get_dai_id()" to the asoc tree Mark Brown
2019-07-12 7:45 ` Kuninori Morimoto
2019-07-12 10:51 ` Mark Brown
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.