On Mon, Jun 15, 2020 at 05:16:36PM +1000, Greg Ungerer wrote:
Due to the different data endian requirements of different buses on m68knommu variants we sometimes need to byte swap results for readX() or values to writeX(). Currently the code uses cpu_to_le to do this, resulting in sparse warnings like: arch/m68k/include/asm/io_no.h:78:16: sparse: sparse: cast to restricted __le32 Some casting to force __le32 types would resolve but it looks to be simpler to just switch to using the underlying swab32() to resolve.
Yes indeed, since the raw accessors are supposed to be native-endian, doing: native -> force cast to le32 -> le32_to_cpu() doesn't seem to have any advantages over the swab32(). Feel free to add my: Reviewed-y: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> -- Luc