Skip to contentSkip to conversation

ASoC: audio-graph-card: add missing const at graph_get_dai_id()

PATCH In review Kuninori Morimoto 3 participants 5 messages Jul 11, 2019 – Jul 12, 2019

Subsystems (3)
lore
Share & tools
lore

Kuninori Morimoto

author maintainer
#0 lore raw

PATCH 1/1 ASoC: audio-graph-card: add missing const at graph_get_dai_id()

From: Kuninori Morimoto <[email protected]>

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()")
---
 sound/soc/generic/audio-graph-card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/generic/audio-graph-card.c +1 -1
index 343ede8..ebf2ca3 100644
@@ -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.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 33 lines

From: Kuninori Morimoto <[email protected]>

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()")

---
sound/soc/generic/audio-graph-card.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/generic/audio-graph-card.c +1 -2
index 343ede8..ebf2ca3 100644
@@ -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 */
--
Quoted 1 line

2.7.4

Thanks.

---
Best regards
Wen

maintainer
#2 lore raw

Applied "ASoC: audio-graph-card: add missing const at graph_get_dai_id()" to the asoc tree

In reply to Kuninori Morimoto

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

Quoted 1 line

From ec3042ad39d4e2ddbc3a3344f90bb10d8feb53bc Mon Sep 17 00:00:00 2001

From: Kuninori Morimoto <[email protected]>
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()")
---
 sound/soc/generic/audio-graph-card.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/generic/audio-graph-card.c +1 -1
index 343ede8042c3..ebf2ca3249cb 100644
@@ -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.1
author maintainer
#3 lore raw

Re: Applied "ASoC: audio-graph-card: add missing const at graph_get_dai_id()" to the asoc tree

Hi Mark

Quoted 5 lines
Fixes c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()")

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

maintainer
#4 lore raw

Re: Applied "ASoC: audio-graph-card: add missing const at graph_get_dai_id()" to the asoc tree

Quoted 9 lines · Kuninori Morimoto
Quoted 5 lines
Fixes c152f8491a8d9 ("ASoC: audio-graph-card: fix an use-after-free in graph_get_dai_id()")

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.