[U-Boot] [PATCH 3/3] compiler.h: remove duplicated uninitialized_var
Masahiro Yamada
yamada.m at jp.panasonic.com
Thu Sep 18 04:14:35 CEST 2014
Jeroen,
> Since clang has a different definition for uninitialized_var
> it will complain that it is redefined in include/compiler.h.
> Since these are already defined in linux/compiler.h just remove
> this instance.
>
> Cc: Masahiro Yamada <yamada.m at jp.panasonic.com>
> Cc: Tom Rini <trini at ti.com>
> Signed-off-by: Jeroen Hofstee <jeroen at myspectrum.nl>
I don't mind this patch but it has made me realize
another problem.
We have both include/compiler.h and include/linux/compiler.h.
Some sources use tha former and others use the latter.
I don't know how to use the right one in the right place.
Header file policy is one of the biggest problem in U-boot.
Everyone has added ugly work-arounds to solve his own problem
without correct views or judgement.
> diff --git a/include/compiler.h b/include/compiler.h
> index 9afc11b..1451916 100644
> --- a/include/compiler.h
> +++ b/include/compiler.h
> @@ -129,9 +129,6 @@ typedef unsigned long int uintptr_t;
>
> #endif /* USE_HOSTCC */
>
> -/* compiler options */
> -#define uninitialized_var(x) x = x
> -
> #define likely(x) __builtin_expect(!!(x), 1)
> #define unlikely(x) __builtin_expect(!!(x), 0)
>
I am not sure if likely(x) and unlikely(x) should also
duplicated here.
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list