ASoC: soc-core: Fix sparse warning in be32_to_cpup() call
PATCH v2 1/1 ASoC: soc-core: Fix sparse warning in be32_to_cpup() call
--- sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-core.c +1 -1
@@ -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)
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: soc-core: Fix sparse warning in be32_to_cpup() call" to the asoc tree
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
Quoted 1 line
From
6c84e5917f83334f9196a50cfa31e72207b1a7f6Mon Sep 17 00:00:00 2001
From: Jyri Sarha <[email protected]>
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.
--- sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-core.c +1 -1
@@ -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)
Signature · 1 line
2.5.0