* [U-Boot] [PATCH] spi: mxc_spi: Fix build warning on ARM64 platforms
@ 2019-01-04 9:26 Ye Li
2019-01-30 8:57 ` [U-Boot] " sbabic at denx.de
0 siblings, 1 reply; 2+ messages in thread
From: Ye Li @ 2019-01-04 9:26 UTC (permalink / raw)
To: u-boot
When building mxc_spi driver on ARM64 platforms, get below build warnings.
Fix it in this patch.
In file included from include/common.h:48:0,
from drivers/spi/mxc_spi.c:9:
drivers/spi/mxc_spi.c: In function ‘spi_xchg_single’:
drivers/spi/mxc_spi.c:232:21: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
_func_, bitlen, (u32)dout, (u32)din);
^
include/log.h:135:26: note: in definition of macro ‘debug_cond’
printf(pr_fmt(fmt), ##args); \
^~~~
drivers/spi/mxc_spi.c:231:2: note: in expansion of macro ‘debug’
debug("%s: bitlen %d dout 0x%x din 0x%x\n",
^~~~~
drivers/spi/mxc_spi.c:232:32: warning: cast from pointer to integer of
different size [-Wpointer-to-int-cast]
_func_, bitlen, (u32)dout, (u32)din);
^
include/log.h:135:26: note: in definition of macro ‘debug_cond’
printf(pr_fmt(fmt), ##args); \
^~~~
drivers/spi/mxc_spi.c:231:2: note: in expansion of macro ‘debug’
debug("%s: bitlen %d dout 0x%x din 0x%x\n",
^~~~~
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
---
drivers/spi/mxc_spi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index b263690..6846762 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -224,8 +224,8 @@ int spi_xchg_single(struct mxc_spi_slave *mxcs, unsigned int bitlen,
u32 ts;
int status;
- debug("%s: bitlen %d dout 0x%x din 0x%x\n",
- __func__, bitlen, (u32)dout, (u32)din);
+ debug("%s: bitlen %d dout 0x%lx din 0x%lx\n",
+ __func__, bitlen, (ulong)dout, (ulong)din);
mxcs->ctrl_reg = (mxcs->ctrl_reg &
~MXC_CSPICTRL_BITCOUNT(MXC_CSPICTRL_MAXBITS)) |
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] spi: mxc_spi: Fix build warning on ARM64 platforms
2019-01-04 9:26 [U-Boot] [PATCH] spi: mxc_spi: Fix build warning on ARM64 platforms Ye Li
@ 2019-01-30 8:57 ` sbabic at denx.de
0 siblings, 0 replies; 2+ messages in thread
From: sbabic at denx.de @ 2019-01-30 8:57 UTC (permalink / raw)
To: u-boot
> When building mxc_spi driver on ARM64 platforms, get below build warnings.
> Fix it in this patch.
> In file included from include/common.h:48:0,
> from drivers/spi/mxc_spi.c:9:
> drivers/spi/mxc_spi.c: In function ‘spi_xchg_single’:
> drivers/spi/mxc_spi.c:232:21: warning: cast from pointer to integer of
> different size [-Wpointer-to-int-cast]
> _func_, bitlen, (u32)dout, (u32)din);
> ^
> include/log.h:135:26: note: in definition of macro ‘debug_cond’
> printf(pr_fmt(fmt), ##args); \
> ^~~~
> drivers/spi/mxc_spi.c:231:2: note: in expansion of macro ‘debug’
> debug("%s: bitlen %d dout 0x%x din 0x%x\n",
> ^~~~~
> drivers/spi/mxc_spi.c:232:32: warning: cast from pointer to integer of
> different size [-Wpointer-to-int-cast]
> _func_, bitlen, (u32)dout, (u32)din);
> ^
> include/log.h:135:26: note: in definition of macro ‘debug_cond’
> printf(pr_fmt(fmt), ##args); \
> ^~~~
> drivers/spi/mxc_spi.c:231:2: note: in expansion of macro ‘debug’
> debug("%s: bitlen %d dout 0x%x din 0x%x\n",
> ^~~~~
> Signed-off-by: Ye Li <ye.li@nxp.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-30 8:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-04 9:26 [U-Boot] [PATCH] spi: mxc_spi: Fix build warning on ARM64 platforms Ye Li
2019-01-30 8:57 ` [U-Boot] " sbabic at denx.de
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.