All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32
@ 2017-07-23 15:05 Simon Glass
  2017-07-23 15:47 ` Tom Rini
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2017-07-23 15:05 UTC (permalink / raw)
  To: u-boot

This does not work on 64-bit machines. Update it to use ulong.

This fixes the following warnings in some zynq boards;

common/fb_mmc.c: In function 'fb_mmc_update_zimage':
common/fb_mmc.c:188:13: warning: cast from pointer to integer of different
	size [-Wpointer-to-int-cast]
common/fb_mmc.c:189:8: warning: cast to pointer from integer of different
	size [-Wint-to-pointer-cast]

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/fb_mmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/fb_mmc.c b/common/fb_mmc.c
index 2113b6c372..012c3f07b2 100644
--- a/common/fb_mmc.c
+++ b/common/fb_mmc.c
@@ -162,7 +162,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
 				void *download_buffer,
 				unsigned int download_bytes)
 {
-	u32 hdr_addr;				/* boot image header address */
+	ulong hdr_addr;				/* boot image header address */
 	struct andr_img_hdr *hdr;		/* boot image header */
 	lbaint_t hdr_sectors;			/* boot image header sectors */
 	u8 *ramdisk_buffer;
@@ -185,7 +185,7 @@ static int fb_mmc_update_zimage(struct blk_desc *dev_desc,
 	}
 
 	/* Put boot image header in fastboot buffer after downloaded zImage */
-	hdr_addr = (u32)download_buffer + ALIGN(download_bytes, PAGE_SIZE);
+	hdr_addr = (ulong)download_buffer + ALIGN(download_bytes, PAGE_SIZE);
 	hdr = (struct andr_img_hdr *)hdr_addr;
 
 	/* Read boot image header */
-- 
2.14.0.rc0.284.gd933b75aa4-goog

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

* [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32
  2017-07-23 15:05 [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32 Simon Glass
@ 2017-07-23 15:47 ` Tom Rini
  2017-07-24 12:09   ` Marek Vasut
  2017-07-24 16:43   ` Simon Glass
  0 siblings, 2 replies; 8+ messages in thread
From: Tom Rini @ 2017-07-23 15:47 UTC (permalink / raw)
  To: u-boot

On Sun, Jul 23, 2017 at 09:05:31AM -0600, Simon Glass wrote:

> This does not work on 64-bit machines. Update it to use ulong.
> 
> This fixes the following warnings in some zynq boards;
> 
> common/fb_mmc.c: In function 'fb_mmc_update_zimage':
> common/fb_mmc.c:188:13: warning: cast from pointer to integer of different
> 	size [-Wpointer-to-int-cast]
> common/fb_mmc.c:189:8: warning: cast to pointer from integer of different
> 	size [-Wint-to-pointer-cast]
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

I fixed this in a slightly different way a while ago and am waiting for
it to come in via the USB tree currently.

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

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

* [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32
  2017-07-23 15:47 ` Tom Rini
@ 2017-07-24 12:09   ` Marek Vasut
  2017-07-24 12:47     ` Tom Rini
  2017-07-24 16:43   ` Simon Glass
  1 sibling, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2017-07-24 12:09 UTC (permalink / raw)
  To: u-boot

On 07/23/2017 05:47 PM, Tom Rini wrote:
> On Sun, Jul 23, 2017 at 09:05:31AM -0600, Simon Glass wrote:
> 
>> This does not work on 64-bit machines. Update it to use ulong.
>>
>> This fixes the following warnings in some zynq boards;
>>
>> common/fb_mmc.c: In function 'fb_mmc_update_zimage':
>> common/fb_mmc.c:188:13: warning: cast from pointer to integer of different
>> 	size [-Wpointer-to-int-cast]
>> common/fb_mmc.c:189:8: warning: cast to pointer from integer of different
>> 	size [-Wint-to-pointer-cast]
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
> 
> I fixed this in a slightly different way a while ago and am waiting for
> it to come in via the USB tree currently.
> 
MMC patch via USB ? Anyway, this should use uintptr_t I guess ?

-- 
Best regards,
Marek Vasut

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

* [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32
  2017-07-24 12:09   ` Marek Vasut
@ 2017-07-24 12:47     ` Tom Rini
  2017-07-24 12:53       ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2017-07-24 12:47 UTC (permalink / raw)
  To: u-boot

On Mon, Jul 24, 2017 at 02:09:56PM +0200, Marek Vasut wrote:
> On 07/23/2017 05:47 PM, Tom Rini wrote:
> > On Sun, Jul 23, 2017 at 09:05:31AM -0600, Simon Glass wrote:
> > 
> >> This does not work on 64-bit machines. Update it to use ulong.
> >>
> >> This fixes the following warnings in some zynq boards;
> >>
> >> common/fb_mmc.c: In function 'fb_mmc_update_zimage':
> >> common/fb_mmc.c:188:13: warning: cast from pointer to integer of different
> >> 	size [-Wpointer-to-int-cast]
> >> common/fb_mmc.c:189:8: warning: cast to pointer from integer of different
> >> 	size [-Wint-to-pointer-cast]
> >>
> >> Signed-off-by: Simon Glass <sjg@chromium.org>
> > 
> > I fixed this in a slightly different way a while ago and am waiting for
> > it to come in via the USB tree currently.
> 
> MMC patch via USB ? Anyway, this should use uintptr_t I guess ?

"fastboot" is USB gadget code, and comes via Lukasz.  Unless you want me
to pick it up directly?  Thanks!

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

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

* [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32
  2017-07-24 12:47     ` Tom Rini
@ 2017-07-24 12:53       ` Marek Vasut
  2017-07-24 13:28         ` Łukasz Majewski
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2017-07-24 12:53 UTC (permalink / raw)
  To: u-boot

On 07/24/2017 02:47 PM, Tom Rini wrote:
> On Mon, Jul 24, 2017 at 02:09:56PM +0200, Marek Vasut wrote:
>> On 07/23/2017 05:47 PM, Tom Rini wrote:
>>> On Sun, Jul 23, 2017 at 09:05:31AM -0600, Simon Glass wrote:
>>>
>>>> This does not work on 64-bit machines. Update it to use ulong.
>>>>
>>>> This fixes the following warnings in some zynq boards;
>>>>
>>>> common/fb_mmc.c: In function 'fb_mmc_update_zimage':
>>>> common/fb_mmc.c:188:13: warning: cast from pointer to integer of different
>>>> 	size [-Wpointer-to-int-cast]
>>>> common/fb_mmc.c:189:8: warning: cast to pointer from integer of different
>>>> 	size [-Wint-to-pointer-cast]
>>>>
>>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>>
>>> I fixed this in a slightly different way a while ago and am waiting for
>>> it to come in via the USB tree currently.
>>
>> MMC patch via USB ? Anyway, this should use uintptr_t I guess ?
> 
> "fastboot" is USB gadget code, and comes via Lukasz.  Unless you want me
> to pick it up directly?  Thanks!
> 
The tags didn't indicate any such thing and I didn't see the entire
patch since it was clipped, so ... anyway, if it's fastboot, it indeed
goes via Lukasz.

-- 
Best regards,
Marek Vasut

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

* [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32
  2017-07-24 12:53       ` Marek Vasut
@ 2017-07-24 13:28         ` Łukasz Majewski
  2017-07-24 13:34           ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Łukasz Majewski @ 2017-07-24 13:28 UTC (permalink / raw)
  To: u-boot

On 07/24/2017 02:53 PM, Marek Vasut wrote:
> On 07/24/2017 02:47 PM, Tom Rini wrote:
>> On Mon, Jul 24, 2017 at 02:09:56PM +0200, Marek Vasut wrote:
>>> On 07/23/2017 05:47 PM, Tom Rini wrote:
>>>> On Sun, Jul 23, 2017 at 09:05:31AM -0600, Simon Glass wrote:
>>>>
>>>>> This does not work on 64-bit machines. Update it to use ulong.
>>>>>
>>>>> This fixes the following warnings in some zynq boards;
>>>>>
>>>>> common/fb_mmc.c: In function 'fb_mmc_update_zimage':
>>>>> common/fb_mmc.c:188:13: warning: cast from pointer to integer of different
>>>>> 	size [-Wpointer-to-int-cast]
>>>>> common/fb_mmc.c:189:8: warning: cast to pointer from integer of different
>>>>> 	size [-Wint-to-pointer-cast]
>>>>>
>>>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>>>
>>>> I fixed this in a slightly different way a while ago and am waiting for
>>>> it to come in via the USB tree currently.
>>>
>>> MMC patch via USB ? Anyway, this should use uintptr_t I guess ?
>>
>> "fastboot" is USB gadget code, and comes via Lukasz.  Unless you want me
>> to pick it up directly?  Thanks!
>>
> The tags didn't indicate any such thing and I didn't see the entire
> patch since it was clipped, so ... anyway, if it's fastboot, it indeed
> goes via Lukasz.
>

The fb_mmc.c is a bit misleading.

I will take this patch when we fix issues with u-boot-usb tree.

-- 
Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

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

* [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32
  2017-07-24 13:28         ` Łukasz Majewski
@ 2017-07-24 13:34           ` Marek Vasut
  0 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2017-07-24 13:34 UTC (permalink / raw)
  To: u-boot

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1254", Size: 1542 bytes --]

On 07/24/2017 03:28 PM, Łukasz Majewski wrote:
> On 07/24/2017 02:53 PM, Marek Vasut wrote:
>> On 07/24/2017 02:47 PM, Tom Rini wrote:
>>> On Mon, Jul 24, 2017 at 02:09:56PM +0200, Marek Vasut wrote:
>>>> On 07/23/2017 05:47 PM, Tom Rini wrote:
>>>>> On Sun, Jul 23, 2017 at 09:05:31AM -0600, Simon Glass wrote:
>>>>>
>>>>>> This does not work on 64-bit machines. Update it to use ulong.
>>>>>>
>>>>>> This fixes the following warnings in some zynq boards;
>>>>>>
>>>>>> common/fb_mmc.c: In function 'fb_mmc_update_zimage':
>>>>>> common/fb_mmc.c:188:13: warning: cast from pointer to integer of
>>>>>> different
>>>>>>     size [-Wpointer-to-int-cast]
>>>>>> common/fb_mmc.c:189:8: warning: cast to pointer from integer of
>>>>>> different
>>>>>>     size [-Wint-to-pointer-cast]
>>>>>>
>>>>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>>>>
>>>>> I fixed this in a slightly different way a while ago and am waiting
>>>>> for
>>>>> it to come in via the USB tree currently.
>>>>
>>>> MMC patch via USB ? Anyway, this should use uintptr_t I guess ?
>>>
>>> "fastboot" is USB gadget code, and comes via Lukasz.  Unless you want me
>>> to pick it up directly?  Thanks!
>>>
>> The tags didn't indicate any such thing and I didn't see the entire
>> patch since it was clipped, so ... anyway, if it's fastboot, it indeed
>> goes via Lukasz.
>>
> 
> The fb_mmc.c is a bit misleading.
> 
> I will take this patch when we fix issues with u-boot-usb tree.
> 

Super, thanks. Seems that'll not take long anymore ...

-- 
Best regards,
Marek Vasut

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

* [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32
  2017-07-23 15:47 ` Tom Rini
  2017-07-24 12:09   ` Marek Vasut
@ 2017-07-24 16:43   ` Simon Glass
  1 sibling, 0 replies; 8+ messages in thread
From: Simon Glass @ 2017-07-24 16:43 UTC (permalink / raw)
  To: u-boot

On 23 July 2017 at 09:47, Tom Rini <trini@konsulko.com> wrote:
> On Sun, Jul 23, 2017 at 09:05:31AM -0600, Simon Glass wrote:
>
>> This does not work on 64-bit machines. Update it to use ulong.
>>
>> This fixes the following warnings in some zynq boards;
>>
>> common/fb_mmc.c: In function 'fb_mmc_update_zimage':
>> common/fb_mmc.c:188:13: warning: cast from pointer to integer of different
>>       size [-Wpointer-to-int-cast]
>> common/fb_mmc.c:189:8: warning: cast to pointer from integer of different
>>       size [-Wint-to-pointer-cast]
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>
> I fixed this in a slightly different way a while ago and am waiting for
> it to come in via the USB tree currently.

OK thanks.

- Simon

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

end of thread, other threads:[~2017-07-24 16:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-23 15:05 [U-Boot] [PATCH] zynq: fb_mmc: Correct cast of address to u32 Simon Glass
2017-07-23 15:47 ` Tom Rini
2017-07-24 12:09   ` Marek Vasut
2017-07-24 12:47     ` Tom Rini
2017-07-24 12:53       ` Marek Vasut
2017-07-24 13:28         ` Łukasz Majewski
2017-07-24 13:34           ` Marek Vasut
2017-07-24 16:43   ` Simon Glass

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.