spi: spi-imx: spi_imx_buf_rx_swap_u32(): fix sparse warning: use swab32s() instead...
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 2 May 2022 17:54:52 +0000 (19:54 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 9 May 2022 17:18:11 +0000 (18:18 +0100)
commitdae336d0dca669143e0fdf6b82c333bf6a8d9e0a
treeaefb394481723bda64801a9f8674e35ee4afbc3d
parent1a23461a8a08c4a32972dec31a394eee3302511d
spi: spi-imx: spi_imx_buf_rx_swap_u32(): fix sparse warning: use swab32s() instead of cpu_to_be32()

This patch fixes the following sparse warning by using a swab32s()
instead of a cpu_to_be32(). The driver is used on little endian
systems only and we really want to swap the bytes.

| drivers/spi/spi-imx.c:305:29: warning: incorrect type in assignment (different base types)
| drivers/spi/spi-imx.c:305:29:    expected unsigned int val
| drivers/spi/spi-imx.c:305:29:    got restricted __be32 [usertype]
| drivers/spi/spi-imx.c:361:21: warning: incorrect type in assignment (different base types)
| drivers/spi/spi-imx.c:361:21:    expected unsigned int [assigned] [usertype] val
| drivers/spi/spi-imx.c:361:21:    got restricted __be32 [usertype]

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Link: https://lore.kernel.org/r/20220502175457.1977983-5-mkl@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-imx.c