mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
Fix Sparse warnings
Merge series from Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>: Fix casting warnings and other cleanups: - Use ioread32be instead of readl - Use iowrite32be instead of writel
This commit is contained in:
commit
e7ccaaadeb
@ -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);
|
||||
}
|
||||
|
||||
|
@ -407,7 +407,7 @@ static void spi_imx_buf_tx_swap(struct spi_imx_data *spi_imx)
|
||||
|
||||
static void mx53_ecspi_rx_target(struct spi_imx_data *spi_imx)
|
||||
{
|
||||
u32 val = be32_to_cpu(readl(spi_imx->base + MXC_CSPIRXDATA));
|
||||
u32 val = ioread32be(spi_imx->base + MXC_CSPIRXDATA);
|
||||
|
||||
if (spi_imx->rx_buf) {
|
||||
int n_bytes = spi_imx->target_burst % sizeof(val);
|
||||
@ -436,13 +436,12 @@ static void mx53_ecspi_tx_target(struct spi_imx_data *spi_imx)
|
||||
if (spi_imx->tx_buf) {
|
||||
memcpy(((u8 *)&val) + sizeof(val) - n_bytes,
|
||||
spi_imx->tx_buf, n_bytes);
|
||||
val = cpu_to_be32(val);
|
||||
spi_imx->tx_buf += n_bytes;
|
||||
}
|
||||
|
||||
spi_imx->count -= n_bytes;
|
||||
|
||||
writel(val, spi_imx->base + MXC_CSPITXDATA);
|
||||
iowrite32be(val, spi_imx->base + MXC_CSPITXDATA);
|
||||
}
|
||||
|
||||
/* MX51 eCSPI */
|
||||
|
Loading…
Reference in New Issue
Block a user