diff mbox

[v2,1/2] spi: core: Use %zu for printing 'size_t' type

Message ID 1455730948-24938-1-git-send-email-fabio.estevam@nxp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabio Estevam Feb. 17, 2016, 5:42 p.m. UTC
Use %zu for printing 'size_t' type in order to fix the following
build warning on ARM64:

drivers/spi/spi.c: In function '__spi_split_transfer_maxsize':
drivers/spi/spi.c:2278:2: warning: format '%i' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat=]

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Changes since v1:
- None

 drivers/spi/spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin Sperl Feb. 17, 2016, 6:23 p.m. UTC | #1
> On 17.02.2016, at 18:42, Fabio Estevam <fabio.estevam@nxp.com> wrote:
> 
> Use %zu for printing 'size_t' type in order to fix the following
> build warning on ARM64:
> 
> drivers/spi/spi.c: In function '__spi_split_transfer_maxsize':
> drivers/spi/spi.c:2278:2: warning: format '%i' expects argument of type 'int', but argument 4 has type 'size_t' [-Wformat=]
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

Thanks, was busy with other stuff and thus could not 
create a patch myself.

Acked-by: Martin Sperl <kernel@martin.sperl.org>--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index f6c76be..0725ffa 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2276,7 +2276,7 @@  static int __spi_split_transfer_maxsize(struct spi_master *master,
 
 	/* warn once about this fact that we are splitting a transfer */
 	dev_warn_once(&msg->spi->dev,
-		      "spi_transfer of length %i exceed max length of %i - needed to split transfers\n",
+		      "spi_transfer of length %i exceed max length of %zu - needed to split transfers\n",
 		      xfer->len, maxsize);
 
 	/* calculate how many we have to replace */