Message ID | 87sgrd43ja.wl-kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ec3042ad39d4e2ddbc3a3344f90bb10d8feb53bc |
Headers | show |
Series | ASoC: audio-graph-card: add missing const at graph_get_dai_id() | expand |
> 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
Hi Mark > 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> I noticed that latest commit has "Link" line, but, it will be "404 Not Found" for me. Is this bug ? Thank you for your help !! Best regards --- Kuninori Morimoto
On Fri, Jul 12, 2019 at 04:45:10PM +0900, Kuninori Morimoto wrote: > > 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> > I noticed that latest commit has "Link" line, > but, it will be "404 Not Found" for me. > Is this bug ? It's because alsa-devel isn't archived by lore and you didn't CC to any list that is. I guess we should look at getting the list archived on lore.
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 */