• Greg Ungerer's avatar
    m68knommu: fix use of cpu_to_le() on IO access · d4aa8aff
    Greg Ungerer authored
    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.
    
    Similarly handle the 16bit cases in these functions as well.
    Reported-by: default avatarkernel test robot <lkp@intel.com>
    CC: Marc Kleine-Budde <mkl@pengutronix.de>
    Reviewed-by: default avatarLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
    Signed-off-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
    d4aa8aff
io_no.h 4.1 KB