LIBFDT: bogus definition of fdt in libfdt_env.h
Hi Jerry,
in libfdt_env.h there is fdt defined as:
struct fdt_header *fdt; /* Pointer to the working fdt */
I think it should be declared "extern", because the file is included by more than one file. Or the declaration should be moved to cmd_fdt.c, because it's the only file actually using it.
Wolfgang.
Quoted 11 lines · Wolfgang Grandegger
Hi Jerry,
in
libfdt_env.hthere is fdt defined as:struct
fdt_header*fdt; /* Pointer to the working fdt */I think it should be declared "extern", because the file is included by more than one file. Or the declaration should be moved to
cmd_fdt.c, because it's the only file actually using it.Wolfgang.
Hi Wolfgang G,
Yes, that is not declared properly. IIRC, I split the fdt_support.c out of cmd_fdt.c and moved the declaration into the .h file because I thought I would need it in more places (cmd_bootm.c, IIRC). The move was done poorly.
I'll add figuring out the proper location and declaration to the cleanup list. It probably should move (as a static) back into cmd_fdt.c until it is actually needed elsewhere.
Thanks,
gvb