[U-Boot] [RFC PATCH 02/12] linux_compat: remove cpu_relax() define

Simon Glass sjg at chromium.org
Thu Jul 9 02:22:45 CEST 2015


On 7 July 2015 at 22:29, Masahiro Yamada <yamada.masahiro at socionext.com> wrote:
> The macro cpu_relax() is defined by several headers in different
> ways.
>
> arch/{arm,avr32,mips}/include/asm/processor.h defines it as follows:
>   #define cpu_relax()   barrier()
>
> On the other hand, include/linux/compat.h defines it as follows:
>   #define cpu_relax() do {} while (0)
>
> If both headers are included from the same source file, the warning
>   warning: "cpu_relax" redefined [enabled by default]
> is displayed.
>
> It effectively makes it impossible to include <linux/compat.h>
> from some sources.  Drop the latter.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> ---
>
>  drivers/usb/musb-new/musb_gadget_ep0.c | 1 +
>  include/linux/compat.h                 | 2 --
>  2 files changed, 1 insertion(+), 2 deletions(-)

Acked-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list