* [U-Boot] [PATCH v2] driver: spi: fsl-qspi: remove compile Warnings
@ 2016-07-13 2:46 Yunhui Cui
2016-08-02 22:40 ` york sun
0 siblings, 1 reply; 3+ messages in thread
From: Yunhui Cui @ 2016-07-13 2:46 UTC (permalink / raw)
To: u-boot
From: Yunhui Cui <yunhui.cui@nxp.com>
Warnins log:
drivers/spi/fsl_qspi.c: In function ?qspi_ahb_read?:
drivers/spi/fsl_qspi.c:400:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
memcpy(rxbuf, (u8 *)(priv->cur_amba_base + priv->sf_addr), len);
Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
---
drivers/spi/fsl_qspi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index 75cbab2..2144fca 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -386,6 +386,7 @@ static inline void qspi_ahb_read(struct fsl_qspi_priv *priv, u8 *rxbuf, int len)
{
struct fsl_qspi_regs *regs = priv->regs;
u32 mcr_reg;
+ void *rx_addr = NULL;
mcr_reg = qspi_read32(priv->flags, ®s->mcr);
@@ -393,8 +394,9 @@ static inline void qspi_ahb_read(struct fsl_qspi_priv *priv, u8 *rxbuf, int len)
QSPI_MCR_CLR_RXF_MASK | QSPI_MCR_CLR_TXF_MASK |
QSPI_MCR_RESERVED_MASK | QSPI_MCR_END_CFD_LE);
+ rx_addr = (void *)(uintptr_t)(priv->cur_amba_base + priv->sf_addr);
/* Read out the data directly from the AHB buffer. */
- memcpy(rxbuf, (u8 *)(priv->cur_amba_base + priv->sf_addr), len);
+ memcpy(rxbuf, rx_addr, len);
qspi_write32(priv->flags, ®s->mcr, mcr_reg);
}
--
2.1.0.27.g96db324
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] driver: spi: fsl-qspi: remove compile Warnings
2016-07-13 2:46 [U-Boot] [PATCH v2] driver: spi: fsl-qspi: remove compile Warnings Yunhui Cui
@ 2016-08-02 22:40 ` york sun
2016-08-03 2:37 ` Yunhui Cui
0 siblings, 1 reply; 3+ messages in thread
From: york sun @ 2016-08-02 22:40 UTC (permalink / raw)
To: u-boot
On 07/12/2016 07:57 PM, Yunhui Cui wrote:
> From: Yunhui Cui <yunhui.cui@nxp.com>
>
> Warnins log:
> drivers/spi/fsl_qspi.c: In function ?qspi_ahb_read?:
> drivers/spi/fsl_qspi.c:400:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
> memcpy(rxbuf, (u8 *)(priv->cur_amba_base + priv->sf_addr), len);
>
> Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
> ---
> drivers/spi/fsl_qspi.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Applied to fsl-qoriq master, awaiting upstream.
Thanks.
York
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] driver: spi: fsl-qspi: remove compile Warnings
2016-08-02 22:40 ` york sun
@ 2016-08-03 2:37 ` Yunhui Cui
0 siblings, 0 replies; 3+ messages in thread
From: Yunhui Cui @ 2016-08-03 2:37 UTC (permalink / raw)
To: u-boot
Thanks a lot!
Yunhui
> -----Original Message-----
> From: york sun
> Sent: Wednesday, August 03, 2016 6:40 AM
> To: Yunhui Cui
> Cc: u-boot at lists.denx.de; Yunhui Cui
> Subject: Re: [PATCH v2] driver: spi: fsl-qspi: remove compile Warnings
>
> On 07/12/2016 07:57 PM, Yunhui Cui wrote:
> > From: Yunhui Cui <yunhui.cui@nxp.com>
> >
> > Warnins log:
> > drivers/spi/fsl_qspi.c: In function 'qspi_ahb_read':
> > drivers/spi/fsl_qspi.c:400:16: warning: cast to pointer from integer of
> different size [-Wint-to-pointer-cast]
> > memcpy(rxbuf, (u8 *)(priv->cur_amba_base + priv->sf_addr), len);
> >
> > Signed-off-by: Yunhui Cui <yunhui.cui@nxp.com>
> > ---
> > drivers/spi/fsl_qspi.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
>
> Applied to fsl-qoriq master, awaiting upstream.
> Thanks.
>
> York
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-03 2:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-13 2:46 [U-Boot] [PATCH v2] driver: spi: fsl-qspi: remove compile Warnings Yunhui Cui
2016-08-02 22:40 ` york sun
2016-08-03 2:37 ` Yunhui Cui
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.