[U-Boot] [PATCH] Use sizeof(gd_t), not sizeof(struct global_data)

Loïc Minier lool at dooz.org
Mon Jan 3 18:00:50 CET 2011


On Mon, Jan 03, 2011, Mike Frysinger wrote:
> why not change x86's global_data.h to define the struct ?  all other
> arches define 'struct global_data'.

 We could implement both fixes; there are two reasons I preferred
 sending this fix instead of the one you mention:
 * gd_t is used across the tree, while struct global_data is only used
   in arch/*/include/asm/global_data.h headers
 * the global_data.h header suggested that sizeof(gd_t) was an
   acceptable construct in a comment:
   GENERATED_GBL_DATA_SIZE > sizeof(gd_t)

 I'll send an additional patch to also add struct global_data to
 arch/i386/include/asm/global_data.h.

-- 
Loïc Minier


More information about the U-Boot mailing list