[U-Boot] [PATCH v2 7/8] nios2: show fdt blob address in board info command

Simon Glass sjg at chromium.org
Tue Sep 8 05:55:59 CEST 2015


Hi,

On 6 September 2015 at 08:27, Marek Vasut <marex at denx.de> wrote:
> On Sunday, September 06, 2015 at 03:20:21 PM, Thomas Chou wrote:
>> Hi Marek,
>>
>> >>> I think this will not work on 64bit machines.
>>
>> I tried 64bits with
>>
>>       print_lnum("fdt_blob", (u64)gd->fdt_blob);
>>
>> But got this warning,
>>
>>    CC      common/cmd_bdinfo.o
>> common/cmd_bdinfo.c: In function 'do_bdinfo':
>> common/cmd_bdinfo.c:180:25: warning: cast from pointer to integer of
>> different size [-Wpointer-to-int-cast]
>>    print_lnum("fdt_blob", (u64)gd->fdt_blob);
>>                           ^
>> include/asm-generic/global_data.h
>>       const void *fdt_blob;   /* Our device tree, NULL if none */
>>
>> Actually, the print is guarded with CONFIG_NIOS2, so it is safe to use
>> 32bits.
>>
>> Or shall we invent a "print pointer address"?
>
> Simon, Tom, what's your take on this ?

>From what I can tell this code is not generic, and is built for NIOS
only. So IMO the patch is fine and we don't need to worry about
64-bit.

Regards,
Simon


More information about the U-Boot mailing list