public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb: ehci: Fix warning on aarch64
@ 2016-02-26 22:00 Marek Vasut
  2016-02-26 22:17 ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2016-02-26 22:00 UTC (permalink / raw)
  To: u-boot

Fix the following warning on aarch64 introduced by using p2v/v2p
functions in the code:

In file included from ./arch/arm/include/asm/byteorder.h:29:0,
                 from include/compiler.h:125,
                 from include/image.h:19,
                 from include/common.h:88,
                 from drivers/usb/host/ehci-hcd.c:10:
drivers/usb/host/ehci-hcd.c: In function ?ehci_td_buffer?:
drivers/usb/host/ehci-hcd.c:250:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr));
                                                 ^
include/linux/byteorder/little_endian.h:34:51: note: in definition of macro ?__cpu_to_le32?
 #define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
                                                   ^
drivers/usb/host/ehci-hcd.c:250:24: note: in expansion of macro ?cpu_to_hc32?
   td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr));

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tom Rini <trini@konsulko.com>
---
 drivers/usb/host/ehci-hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 8f259be..0113c6c 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -237,7 +237,7 @@ static int ehci_shutdown(struct ehci_ctrl *ctrl)
 static int ehci_td_buffer(struct qTD *td, void *buf, size_t sz)
 {
 	uint32_t delta, next;
-	uint32_t addr = (unsigned long)buf;
+	unsigned long addr = (unsigned long)buf;
 	int idx;
 
 	if (addr != ALIGN(addr, ARCH_DMA_MINALIGN))
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] usb: ehci: Fix warning on aarch64
  2016-02-26 22:00 [U-Boot] [PATCH] usb: ehci: Fix warning on aarch64 Marek Vasut
@ 2016-02-26 22:17 ` Tom Rini
  2016-02-26 22:43   ` Marek Vasut
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2016-02-26 22:17 UTC (permalink / raw)
  To: u-boot

On Fri, Feb 26, 2016 at 11:00:02PM +0100, Marek Vasut wrote:

> Fix the following warning on aarch64 introduced by using p2v/v2p
> functions in the code:
> 
> In file included from ./arch/arm/include/asm/byteorder.h:29:0,
>                  from include/compiler.h:125,
>                  from include/image.h:19,
>                  from include/common.h:88,
>                  from drivers/usb/host/ehci-hcd.c:10:
> drivers/usb/host/ehci-hcd.c: In function ?ehci_td_buffer?:
> drivers/usb/host/ehci-hcd.c:250:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>    td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr));
>                                                  ^
> include/linux/byteorder/little_endian.h:34:51: note: in definition of macro ?__cpu_to_le32?
>  #define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
>                                                    ^
> drivers/usb/host/ehci-hcd.c:250:24: note: in expansion of macro ?cpu_to_hc32?
>    td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr));
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Stephen Warren <swarren@wwwdotorg.org>
> Cc: Tom Rini <trini@konsulko.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160226/e54c5ce2/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] usb: ehci: Fix warning on aarch64
  2016-02-26 22:17 ` Tom Rini
@ 2016-02-26 22:43   ` Marek Vasut
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2016-02-26 22:43 UTC (permalink / raw)
  To: u-boot

On 02/26/2016 11:17 PM, Tom Rini wrote:
> On Fri, Feb 26, 2016 at 11:00:02PM +0100, Marek Vasut wrote:
> 
>> Fix the following warning on aarch64 introduced by using p2v/v2p
>> functions in the code:
>>
>> In file included from ./arch/arm/include/asm/byteorder.h:29:0,
>>                  from include/compiler.h:125,
>>                  from include/image.h:19,
>>                  from include/common.h:88,
>>                  from drivers/usb/host/ehci-hcd.c:10:
>> drivers/usb/host/ehci-hcd.c: In function ?ehci_td_buffer?:
>> drivers/usb/host/ehci-hcd.c:250:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
>>    td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr));
>>                                                  ^
>> include/linux/byteorder/little_endian.h:34:51: note: in definition of macro ?__cpu_to_le32?
>>  #define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
>>                                                    ^
>> drivers/usb/host/ehci-hcd.c:250:24: note: in expansion of macro ?cpu_to_hc32?
>>    td->qt_buffer[idx] = cpu_to_hc32(virt_to_phys((void *)addr));
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Stephen Warren <swarren@wwwdotorg.org>
>> Cc: Tom Rini <trini@konsulko.com>
> 
> Reviewed-by: Tom Rini <trini@konsulko.com>

In that case, applied, thanks!

-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-26 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-26 22:00 [U-Boot] [PATCH] usb: ehci: Fix warning on aarch64 Marek Vasut
2016-02-26 22:17 ` Tom Rini
2016-02-26 22:43   ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox