All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] spi: cadence_qspi: Fix warning cast from pointer to integer of different size
Date: Fri, 1 Jun 2018 10:07:35 +0200	[thread overview]
Message-ID: <449c740a-c6a2-2b8c-e8dc-58e78ad09fec@gmail.com> (raw)
In-Reply-To: <1525686177-49276-3-git-send-email-ley.foon.tan@intel.com>

On 05/07/2018 11:42 AM, Ley Foon Tan wrote:
> Cast to ulong data type.
> 
> 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>
> ---
>  drivers/spi/cadence_qspi_apb.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/cadence_qspi_apb.c b/drivers/spi/cadence_qspi_apb.c
> index aa3a9ff..5bef0ae 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 0x%08lx\n",
> +		       cmdlen, (unsigned long)cmdbuf);

%p ?

>  		return -EINVAL;
>  	}
>  	/* Setup the indirect trigger address */
> 


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2018-06-01  8:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07  9:42 [U-Boot] [PATCH] spi: cadence_qspi: Change to use devfdt_get_addr_index() Ley Foon Tan
2018-05-07  9:42 ` [U-Boot] [PATCH] spi: cadence_qspi: Fix compilation warning Ley Foon Tan
2018-06-01  8:07   ` Marek Vasut
2018-06-01  8:23     ` Ley Foon Tan
2018-05-07  9:42 ` [U-Boot] [PATCH] spi: cadence_qspi: Fix warning cast from pointer to integer of different size Ley Foon Tan
2018-06-01  8:07   ` Marek Vasut [this message]
2018-06-01  8:24     ` Ley Foon Tan
2018-05-16 13:33 ` [U-Boot] [PATCH] spi: cadence_qspi: Change to use devfdt_get_addr_index() Jagan Teki
2018-05-17  2:23   ` Ley Foon Tan
2018-06-01  8:07 ` Marek Vasut
2018-06-01 17:02 ` Jagan Teki
2018-06-01  8:52 [U-Boot] [PATCH] spi: cadence_qspi: Fix compilation warning Ley Foon Tan
2018-06-01  8:52 ` [U-Boot] [PATCH] spi: cadence_qspi: Fix warning cast from pointer to integer of different size Ley Foon Tan
2018-06-01  9:55   ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=449c740a-c6a2-2b8c-e8dc-58e78ad09fec@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.