]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spi: cadence_qspi: Fix warning cast from pointer to integer of different size
authorLey Foon Tan <ley.foon.tan@intel.com>
Fri, 1 Jun 2018 08:52:20 +0000 (16:52 +0800)
committerMarek Vasut <marex@denx.de>
Thu, 12 Jul 2018 07:22:11 +0000 (09:22 +0200)
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 <ley.foon.tan@intel.com>
Acked-by: Marek Vasut <marex@denx.de>
drivers/spi/cadence_qspi_apb.c

index aa3a9ff5fa3bfcf6a399dedc522edfed4b582cff..a8af3520303537e734405f23f633019e70a7fc0e 100644 (file)
@@ -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 */