提交 8299ee81 编写于 作者: C Charles Keepax 提交者: Mark Brown

ASoC: wm_adsp: Use __leXX for little endian data

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: NFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 c61e59fe
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册