提交 3721eaf2 编写于 作者: M Masahiro Yamada 提交者: Simon Glass

linux_compat: remove cpu_relax() define

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: NMasahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: NHeiko Schocher <hs@denx.de>
Acked-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NLukasz Majewski <l.majewski@samsung.com>
上级 5f7e3104
......@@ -43,6 +43,7 @@
#else
#include <common.h>
#include "linux-compat.h"
#include <asm/processor.h>
#endif
#include "musb_core.h"
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册