]> git.sur5r.net Git - u-boot/commitdiff
linux_compat: remove cpu_relax() define
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 13 Jul 2015 04:17:05 +0000 (13:17 +0900)
committerSimon Glass <sjg@chromium.org>
Wed, 22 Jul 2015 13:30:37 +0000 (07:30 -0600)
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@socionext.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
drivers/usb/musb-new/musb_gadget_ep0.c
include/linux/compat.h

index 5a715013a2315e945c0b3a2ab354a4fe533f7f46..415a9f21a9c6c13187511486c016c8693ff5b6ac 100644 (file)
@@ -43,6 +43,7 @@
 #else
 #include <common.h>
 #include "linux-compat.h"
+#include <asm/processor.h>
 #endif
 
 #include "musb_core.h"
index 6ff3915216814e81d0f46fd1ba04e969290ed9a7..da1420f425c84d12f6e8fa947903b5cb338c38da 100644 (file)
@@ -315,8 +315,6 @@ struct notifier_block {};
 
 typedef unsigned long dmaaddr_t;
 
-#define cpu_relax() do {} while (0)
-
 #define pm_runtime_get_sync(dev) do {} while (0)
 #define pm_runtime_put(dev) do {} while (0)
 #define pm_runtime_put_sync(dev) do {} while (0)