Commit 2de024b7 authored by Emil Goode's avatar Emil Goode Committed by Mark Brown

spi/atmel: Fix format specifier warnings

This patch fixes the following sparse warnings.
dma_addr_t can be either u32 or u64 so we should cast to the
largest type and use the format specifier %llx.

drivers/spi/spi-atmel.c: In function ‘atmel_spi_next_xfer_dma_submit’:
drivers/spi/spi-atmel.c:631:2: warning:
	format ‘%x’ expects argument of type ‘unsigned int’,
	but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/spi/spi-atmel.c:631:2: warning:
	format ‘%x’ expects argument of type ‘unsigned int’,
	but argument 9 has type ‘dma_addr_t’ [-Wformat]
drivers/spi/spi-atmel.c: In function ‘atmel_spi_pdc_next_xfer’:
drivers/spi/spi-atmel.c:734:3: warning:
	format ‘%x’ expects argument of type ‘unsigned int’,
	but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/spi/spi-atmel.c:734:3: warning:
	format ‘%x’ expects argument of type ‘unsigned int’,
	but argument 9 has type ‘dma_addr_t’ [-Wformat]
drivers/spi/spi-atmel.c:773:3: warning:
	format ‘%x’ expects argument of type ‘unsigned int’,
	but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/spi/spi-atmel.c:773:3: warning:
	format ‘%x’ expects argument of type ‘unsigned int’,
	but argument 9 has type ‘dma_addr_t’ [-Wformat]
Signed-off-by: default avatarEmil Goode <emilgoode@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 6c07ef29
...@@ -629,9 +629,9 @@ static int atmel_spi_next_xfer_dma_submit(struct spi_master *master, ...@@ -629,9 +629,9 @@ static int atmel_spi_next_xfer_dma_submit(struct spi_master *master,
goto err_dma; goto err_dma;
dev_dbg(master->dev.parent, dev_dbg(master->dev.parent,
" start dma xfer %p: len %u tx %p/%08x rx %p/%08x\n", " start dma xfer %p: len %u tx %p/%08llx rx %p/%08llx\n",
xfer, xfer->len, xfer->tx_buf, xfer->tx_dma, xfer, xfer->len, xfer->tx_buf, (unsigned long long)xfer->tx_dma,
xfer->rx_buf, xfer->rx_dma); xfer->rx_buf, (unsigned long long)xfer->rx_dma);
/* Enable relevant interrupts */ /* Enable relevant interrupts */
spi_writel(as, IER, SPI_BIT(OVRES)); spi_writel(as, IER, SPI_BIT(OVRES));
...@@ -732,9 +732,10 @@ static void atmel_spi_pdc_next_xfer(struct spi_master *master, ...@@ -732,9 +732,10 @@ static void atmel_spi_pdc_next_xfer(struct spi_master *master,
spi_writel(as, TCR, len); spi_writel(as, TCR, len);
dev_dbg(&msg->spi->dev, dev_dbg(&msg->spi->dev,
" start xfer %p: len %u tx %p/%08x rx %p/%08x\n", " start xfer %p: len %u tx %p/%08llx rx %p/%08llx\n",
xfer, xfer->len, xfer->tx_buf, xfer->tx_dma, xfer, xfer->len, xfer->tx_buf,
xfer->rx_buf, xfer->rx_dma); (unsigned long long)xfer->tx_dma, xfer->rx_buf,
(unsigned long long)xfer->rx_dma);
} else { } else {
xfer = as->next_transfer; xfer = as->next_transfer;
remaining = as->next_remaining_bytes; remaining = as->next_remaining_bytes;
...@@ -771,9 +772,10 @@ static void atmel_spi_pdc_next_xfer(struct spi_master *master, ...@@ -771,9 +772,10 @@ static void atmel_spi_pdc_next_xfer(struct spi_master *master,
spi_writel(as, TNCR, len); spi_writel(as, TNCR, len);
dev_dbg(&msg->spi->dev, dev_dbg(&msg->spi->dev,
" next xfer %p: len %u tx %p/%08x rx %p/%08x\n", " next xfer %p: len %u tx %p/%08llx rx %p/%08llx\n",
xfer, xfer->len, xfer->tx_buf, xfer->tx_dma, xfer, xfer->len, xfer->tx_buf,
xfer->rx_buf, xfer->rx_dma); (unsigned long long)xfer->tx_dma, xfer->rx_buf,
(unsigned long long)xfer->rx_dma);
ieval = SPI_BIT(ENDRX) | SPI_BIT(OVRES); ieval = SPI_BIT(ENDRX) | SPI_BIT(OVRES);
} else { } else {
spi_writel(as, RNCR, 0); spi_writel(as, RNCR, 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment