aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-atmel.c
diff options
context:
space:
mode:
authorEmil Goode <emilgoode@gmail.com>2013-07-30 13:35:35 -0400
committerMark Brown <broonie@linaro.org>2013-07-31 12:55:00 -0400
commit2de024b766bb9e31c357f70c6344d1107f38ce1a (patch)
treee70aa94f7aa5d23dc689951f2ca349b17fb87a06 /drivers/spi/spi-atmel.c
parent6c07ef298ac2a05e14cdb059169a78c74badf056 (diff)
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: Emil Goode <emilgoode@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-atmel.c')
-rw-r--r--drivers/spi/spi-atmel.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 4e406930fa52..fd7cc566095a 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -629,9 +629,9 @@ static int atmel_spi_next_xfer_dma_submit(struct spi_master *master,
629 goto err_dma; 629 goto err_dma;
630 630
631 dev_dbg(master->dev.parent, 631 dev_dbg(master->dev.parent,
632 " start dma xfer %p: len %u tx %p/%08x rx %p/%08x\n", 632 " start dma xfer %p: len %u tx %p/%08llx rx %p/%08llx\n",
633 xfer, xfer->len, xfer->tx_buf, xfer->tx_dma, 633 xfer, xfer->len, xfer->tx_buf, (unsigned long long)xfer->tx_dma,
634 xfer->rx_buf, xfer->rx_dma); 634 xfer->rx_buf, (unsigned long long)xfer->rx_dma);
635 635
636 /* Enable relevant interrupts */ 636 /* Enable relevant interrupts */
637 spi_writel(as, IER, SPI_BIT(OVRES)); 637 spi_writel(as, IER, SPI_BIT(OVRES));
@@ -732,9 +732,10 @@ static void atmel_spi_pdc_next_xfer(struct spi_master *master,
732 spi_writel(as, TCR, len); 732 spi_writel(as, TCR, len);
733 733
734 dev_dbg(&msg->spi->dev, 734 dev_dbg(&msg->spi->dev,
735 " start xfer %p: len %u tx %p/%08x rx %p/%08x\n", 735 " start xfer %p: len %u tx %p/%08llx rx %p/%08llx\n",
736 xfer, xfer->len, xfer->tx_buf, xfer->tx_dma, 736 xfer, xfer->len, xfer->tx_buf,
737 xfer->rx_buf, xfer->rx_dma); 737 (unsigned long long)xfer->tx_dma, xfer->rx_buf,
738 (unsigned long long)xfer->rx_dma);
738 } else { 739 } else {
739 xfer = as->next_transfer; 740 xfer = as->next_transfer;
740 remaining = as->next_remaining_bytes; 741 remaining = as->next_remaining_bytes;
@@ -771,9 +772,10 @@ static void atmel_spi_pdc_next_xfer(struct spi_master *master,
771 spi_writel(as, TNCR, len); 772 spi_writel(as, TNCR, len);
772 773
773 dev_dbg(&msg->spi->dev, 774 dev_dbg(&msg->spi->dev,
774 " next xfer %p: len %u tx %p/%08x rx %p/%08x\n", 775 " next xfer %p: len %u tx %p/%08llx rx %p/%08llx\n",
775 xfer, xfer->len, xfer->tx_buf, xfer->tx_dma, 776 xfer, xfer->len, xfer->tx_buf,
776 xfer->rx_buf, xfer->rx_dma); 777 (unsigned long long)xfer->tx_dma, xfer->rx_buf,
778 (unsigned long long)xfer->rx_dma);
777 ieval = SPI_BIT(ENDRX) | SPI_BIT(OVRES); 779 ieval = SPI_BIT(ENDRX) | SPI_BIT(OVRES);
778 } else { 780 } else {
779 spi_writel(as, RNCR, 0); 781 spi_writel(as, RNCR, 0);