m68knommu: fix use of cpu_to_le() on IO access
authorGreg Ungerer <gerg@linux-m68k.org>
Mon, 15 Jun 2020 06:13:44 +0000 (16:13 +1000)
committerGreg Ungerer <gerg@linux-m68k.org>
Mon, 27 Jul 2020 02:32:00 +0000 (12:32 +1000)
commitd4aa8affa1e9e51c237a1ec47a97e96dce76c98c
tree0231d8e1a3d36cc0a4a5b86d937eb39211162ac6
parent005b73d0dd83c9cb9420a196bea8070cde30ecac
m68knommu: fix use of cpu_to_le() on IO access

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: kernel test robot <lkp@intel.com>
CC: Marc Kleine-Budde <mkl@pengutronix.de>
Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
arch/m68k/include/asm/io_no.h