From: Ley Foon Tan Date: Fri, 1 Jun 2018 08:52:20 +0000 (+0800) Subject: spi: cadence_qspi: Fix warning cast from pointer to integer of different size X-Git-Tag: v2018.09-rc1~145^2~19 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8b71e46ceab8b66208107de688cbb4dd25fe38cd;p=oweals%2Fu-boot.git spi: cadence_qspi: Fix warning cast from pointer to integer of different size Use "%p" to print cmdbuf. Compilation warning as below: CC spl/drivers/spi/cadence_qspi_apb.o LD spl/lib/built-in.o drivers/spi/cadence_qspi_apb.c: In function ‘cadence_qspi_apb_indirect_write_setup’: drivers/spi/cadence_qspi_apb.c:696:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] cmdlen, (unsigned int)cmdbuf); Signed-off-by: Ley Foon Tan Acked-by: Marek Vasut --- diff --git a/drivers/spi/cadence_qspi_apb.c b/drivers/spi/cadence_qspi_apb.c index aa3a9ff5fa..a8af352030 100644 --- a/drivers/spi/cadence_qspi_apb.c +++ b/drivers/spi/cadence_qspi_apb.c @@ -692,8 +692,8 @@ int cadence_qspi_apb_indirect_write_setup(struct cadence_spi_platdata *plat, unsigned int addr_bytes = cmdlen > 4 ? 4 : 3; if (cmdlen < 4 || cmdbuf == NULL) { - printf("QSPI: iInvalid input argument, len %d cmdbuf 0x%08x\n", - cmdlen, (unsigned int)cmdbuf); + printf("QSPI: Invalid input argument, len %d cmdbuf %p\n", + cmdlen, cmdbuf); return -EINVAL; } /* Setup the indirect trigger address */