[U-Boot] [PATCH v2] hwconfig: Fix dummy initialization of {board, cpu}_hwconfig
Scott Wood
scottwood at freescale.com
Tue Nov 30 21:46:59 CET 2010
On Tue, 30 Nov 2010 13:11:41 -0600
Kumar Gala <galak at kernel.crashing.org> wrote:
> diff --git a/common/hwconfig.c b/common/hwconfig.c
> index 3c9759f..752bfc3 100644
> --- a/common/hwconfig.c
> +++ b/common/hwconfig.c
> @@ -68,8 +68,8 @@ next:
> return NULL;
> }
>
> -const char *cpu_hwconfig __attribute__((weak));
> -const char *board_hwconfig __attribute__((weak));
> +const char cpu_hwconfig[] __attribute__((weak)) = "";
> +const char board_hwconfig[] __attribute__((weak)) = "";
>
> #define HWCONFIG_PRE_RELOC_BUF_SIZE 128
>
With this we should be able to get rid of the NULL tests of these
variables in __hwconfig() (not that they were doing much good
before...) and save a few bytes.
-Scott
More information about the U-Boot
mailing list