* [PATCH v2] ASoC: soc-core: Fix sparse warning in be32_to_cpup() call
@ 2015-09-17 9:48 Jyri Sarha
2015-09-17 17:36 ` Applied "ASoC: soc-core: Fix sparse warning in be32_to_cpup() call" to the asoc tree Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Jyri Sarha @ 2015-09-17 9:48 UTC (permalink / raw)
To: linux-omap, alsa-devel
Cc: peter.ujfalusi, liam.r.girdwood, broonie, Jyri Sarha
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)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Applied "ASoC: soc-core: Fix sparse warning in be32_to_cpup() call" to the asoc tree
2015-09-17 9:48 [PATCH v2] ASoC: soc-core: Fix sparse warning in be32_to_cpup() call Jyri Sarha
@ 2015-09-17 17:36 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2015-09-17 17:36 UTC (permalink / raw)
To: Jyri Sarha, Mark Brown; +Cc: alsa-devel
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)
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-17 17:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-17 9:48 [PATCH v2] ASoC: soc-core: Fix sparse warning in be32_to_cpup() call Jyri Sarha
2015-09-17 17:36 ` Applied "ASoC: soc-core: Fix sparse warning in be32_to_cpup() call" to the asoc tree Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).