[alsa-devel] [PATCH v2] ASoC: soc-core: Fix sparse warning in be32_to_cpup() call
Signed-off-by: Jyri Sarha jsarha@ti.com --- sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 1929f0e..af4999c 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3294,7 +3294,7 @@ static int snd_soc_of_get_slot_mask(struct device_node *np, unsigned int *mask) { u32 val; - const u32 *of_slot_mask = of_get_property(np, prop_name, &val); + const __be32 *of_slot_mask = of_get_property(np, prop_name, &val); int i;
if (!of_slot_mask)
The patch
ASoC: soc-core: Fix sparse warning in be32_to_cpup() call
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
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 6c84e5917f83334f9196a50cfa31e72207b1a7f6 Mon Sep 17 00:00:00 2001
From: Jyri Sarha jsarha@ti.com Date: Thu, 17 Sep 2015 13:13:38 +0300 Subject: [PATCH] ASoC: soc-core: Fix sparse warning in be32_to_cpup() call
Store return value of of_get_property() to a pointer of __be32 type as device tree has big endian type. This fixes a sparse warning couple of lines later when be32_to_cpup() is used to convert from big endian to cpu endian.
The whole conversion is not really necessary, as we are only checking if the value is zero or not, but I wanted to add it to remind in the future that the data has to be converted before use. Compiler should optimize the unnecessary operations away.
Signed-off-by: Jyri Sarha jsarha@ti.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index c5e21ca..3b471f9 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3296,7 +3296,7 @@ static int snd_soc_of_get_slot_mask(struct device_node *np, unsigned int *mask) { u32 val; - const u32 *of_slot_mask = of_get_property(np, prop_name, &val); + const __be32 *of_slot_mask = of_get_property(np, prop_name, &val); int i;
if (!of_slot_mask)
participants (2)
-
Jyri Sarha
-
Mark Brown