mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
spi: spi-fsl-dspi: Fix casting warnings
Sparse warnings: drivers/spi/spi-fsl-dspi.c:283:17: warning: incorrect type in assignment (different base types) drivers/spi/spi-fsl-dspi.c:283:17: expected unsigned int [usertype] drivers/spi/spi-fsl-dspi.c:283:17: got restricted __be32 [usertype] drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:289:28: warning: cast to restricted __be32 drivers/spi/spi-fsl-dspi.c:295:17: warning: incorrect type in assignment (different base types) drivers/spi/spi-fsl-dspi.c:295:17: expected unsigned int [usertype] drivers/spi/spi-fsl-dspi.c:295:17: got restricted __be16 [usertype] drivers/spi/spi-fsl-dspi.c:301:28: warning: cast to restricted __be16 drivers/spi/spi-fsl-dspi.c:301:28: warning: cast to restricted __be16 drivers/spi/spi-fsl-dspi.c:301:28: warning: cast to restricted __be16 drivers/spi/spi-fsl-dspi.c:301:28: warning: cast to restricted __be16 Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> Link: https://patch.msgid.link/20241008055644.4900-2-hardevsinh.palaniya@siliconsignals.io Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c2a59c892f
commit
66c1c4175b
@ -280,25 +280,25 @@ static void dspi_native_dev_to_host(struct fsl_dspi *dspi, u32 rxdata)
|
||||
|
||||
static void dspi_8on32_host_to_dev(struct fsl_dspi *dspi, u32 *txdata)
|
||||
{
|
||||
*txdata = cpu_to_be32(*(u32 *)dspi->tx);
|
||||
*txdata = (__force u32)cpu_to_be32(*(u32 *)dspi->tx);
|
||||
dspi->tx += sizeof(u32);
|
||||
}
|
||||
|
||||
static void dspi_8on32_dev_to_host(struct fsl_dspi *dspi, u32 rxdata)
|
||||
{
|
||||
*(u32 *)dspi->rx = be32_to_cpu(rxdata);
|
||||
*(u32 *)dspi->rx = be32_to_cpu((__force __be32)rxdata);
|
||||
dspi->rx += sizeof(u32);
|
||||
}
|
||||
|
||||
static void dspi_8on16_host_to_dev(struct fsl_dspi *dspi, u32 *txdata)
|
||||
{
|
||||
*txdata = cpu_to_be16(*(u16 *)dspi->tx);
|
||||
*txdata = (__force u32)cpu_to_be16(*(u16 *)dspi->tx);
|
||||
dspi->tx += sizeof(u16);
|
||||
}
|
||||
|
||||
static void dspi_8on16_dev_to_host(struct fsl_dspi *dspi, u32 rxdata)
|
||||
{
|
||||
*(u16 *)dspi->rx = be16_to_cpu(rxdata);
|
||||
*(u16 *)dspi->rx = be16_to_cpu((__force __be16)rxdata);
|
||||
dspi->rx += sizeof(u16);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user