[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210104085923.53705-1-alexandru.ardelean@analog.com>
Date: Mon, 4 Jan 2021 10:59:23 +0200
From: Alexandru Ardelean <alexandru.ardelean@...log.com>
To: <linux-spi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <andy.shevchenko@...il.com>, <alexandru.ardelean@...log.com>,
<broonie@...nel.org>, <sfr@...b.auug.org.au>
Subject: [PATCH] spi: stm32: update dev_dbg() print format for SPI params
With the introduction of the 'include/uapi/linux/spi/spi.h' header, the
type of the macros are enforced to 'unsigned long int' via the _BITUL()
macro.
This causes some -Wformat warnings in the spi-stm32 driver.
This patch changes the printf() specifiers from '%d' to '%lu' to
accommodate for this change.
Fixes: f7005142dace ("spi: uapi: unify SPI modes into a single spi.h header")
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
---
drivers/spi/spi-stm32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c
index 6017209c6d2f..47fd35acb651 100644
--- a/drivers/spi/spi-stm32.c
+++ b/drivers/spi/spi-stm32.c
@@ -1027,7 +1027,7 @@ static int stm32_spi_prepare_msg(struct spi_master *master,
else
clrb |= spi->cfg->regs->lsb_first.mask;
- dev_dbg(spi->dev, "cpol=%d cpha=%d lsb_first=%d cs_high=%d\n",
+ dev_dbg(spi->dev, "cpol=%lu cpha=%lu lsb_first=%lu cs_high=%lu\n",
spi_dev->mode & SPI_CPOL,
spi_dev->mode & SPI_CPHA,
spi_dev->mode & SPI_LSB_FIRST,
--
2.17.1
Powered by blists - more mailing lists