Re: [PATCH] ASoC: wm8958: use <asm/unaligned.h> to simplify code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 16, 2019 at 01:01:49PM +0100, Ben Dooks (Codethink) wrote:
> Simplify the memcpy/be32_to_cpu() code by simply using
> get_unaligned_be32() throughout and makes the code nicer
> to look at.
> 
> This fixes the following warnings from sparse:
> 
> sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:62:26: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:69:15: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:72:18: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64
> sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64
> sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64
> sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64
> sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64
> sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64
> sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64
> sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64
> sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64
> sound/soc/codecs/wm8958-dsp2.c:91:17: warning: cast to restricted __be64
> sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:108:29: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32
> sound/soc/codecs/wm8958-dsp2.c:120:26: warning: cast to restricted __be32
> 
> Signed-off-by: Ben Dooks <ben.dooks@xxxxxxxxxxxxxxx>
> ---

Acked-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Thanks,
Charles
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux