From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: broonie@kernel.org
Cc: alsa-devel@alsa-project.org, fengguang.wu@intel.com,
lgirdwood@gmail.com, patches@opensource.wolfsonmicro.com
Subject: [PATCH 1/2] ASoC: wm_adsp: Use __leXX for little endian data
Date: Mon, 20 Apr 2015 13:52:44 +0100 [thread overview]
Message-ID: <1429534365-13439-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> (raw)
Using uXX for little endian data, was triggering some warnings through
sparse:
sound/soc/codecs/wm_adsp.c:716:26: sparse: cast to restricted __le16
sound/soc/codecs/wm_adsp.c:736:23: sparse: cast to restricted __le16
sound/soc/codecs/wm_adsp.c:739:23: sparse: cast to restricted __le32
Correct this by changing the casts to use __leXX instead of uXX.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm_adsp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 00289bf..53fc7f8 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -713,7 +713,7 @@ static int wm_coeff_parse_string(int bytes, const u8 **pos, const u8 **str)
length = **pos;
break;
case 2:
- length = le16_to_cpu(*((u16 *)*pos));
+ length = le16_to_cpu(*((__le16 *)*pos));
break;
default:
return 0;
@@ -733,10 +733,10 @@ static int wm_coeff_parse_int(int bytes, const u8 **pos)
switch (bytes) {
case 2:
- val = le16_to_cpu(*((u16 *)*pos));
+ val = le16_to_cpu(*((__le16 *)*pos));
break;
case 4:
- val = le32_to_cpu(*((u32 *)*pos));
+ val = le32_to_cpu(*((__le32 *)*pos));
break;
default:
break;
--
1.7.2.5
next reply other threads:[~2015-04-20 12:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 12:52 Charles Keepax [this message]
2015-04-20 12:52 ` [PATCH v2 2/2] ASoC: wm_adsp: Add support for DSP control flags Charles Keepax
2015-04-20 13:59 ` [PATCH 1/2] ASoC: wm_adsp: Use __leXX for little endian data Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429534365-13439-1-git-send-email-ckeepax@opensource.wolfsonmicro.com \
--to=ckeepax@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=fengguang.wu@intel.com \
--cc=lgirdwood@gmail.com \
--cc=patches@opensource.wolfsonmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox