From 11015342b4fb7a799bfdf7529da2f190ad2c447c Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Sat, 21 Oct 2017 10:10:27 +0200 Subject: soc/intel/quark/spi: Correct conversion specifier Use the correct conversion specifier for `size_t` to fix the error below. ``` from src/soc/intel/quark/spi.c:18: src/soc/intel/quark/spi.c: In function 'xfer': src/soc/intel/quark/spi.c:107:20: error: format '%ld' expects argument \ of type 'long int', but argument 3 has type 'unsigned int' \ [-Werror=format=] printk(BIOS_ERR, "bytesin > %ld\n", sizeof(ctrlr->data)); ^ ``` Found-by: gcc (Debian 7.2.0-8) 7.2.0 Change-Id: I3974d116e85715086a2bd5533a80a20c4cc43303 Signed-off-by: Paul Menzel Reviewed-on: https://review.coreboot.org/22130 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin Reviewed-by: Martin Roth --- src/soc/intel/quark/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/soc/intel/quark/spi.c b/src/soc/intel/quark/spi.c index c943567e1d..a6647fb71a 100644 --- a/src/soc/intel/quark/spi.c +++ b/src/soc/intel/quark/spi.c @@ -104,7 +104,7 @@ static int xfer(const struct spi_slave *slave, const void *dout, /* Validate the buffer sizes */ if (bytesin > sizeof(ctrlr->data)) { - printk(BIOS_ERR, "bytesin > %ld\n", sizeof(ctrlr->data)); + printk(BIOS_ERR, "bytesin > %zu\n", sizeof(ctrlr->data)); goto error; } -- cgit v1.2.3