From: Matthias Kaehlcke Date: Tue, 22 Dec 2009 22:05:45 +0000 (+0100) Subject: move definition of macros likely and unlikely to compiler.h X-Git-Tag: v2010.03-rc1~141 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b63815e31355b44e65899b361da1d8ef6940ab90;p=u-boot move definition of macros likely and unlikely to compiler.h the macros likely and unlikely were defined in include/linux/mtd/compat.h, but used in code not related to MTD. moved the macro definitions to compiler.h Signed-off-by: Matthias Kaehlcke --- diff --git a/include/compiler.h b/include/compiler.h index e602cce2e9..332618e9de 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -125,4 +125,7 @@ typedef unsigned int uintptr_t; /* compiler options */ #define uninitialized_var(x) x = x +#define likely(x) __builtin_expect(!!(x), 1) +#define unlikely(x) __builtin_expect(!!(x), 0) + #endif diff --git a/include/linux/mtd/compat.h b/include/linux/mtd/compat.h index f0c8464db5..39c693f7a8 100644 --- a/include/linux/mtd/compat.h +++ b/include/linux/mtd/compat.h @@ -48,8 +48,5 @@ #define BUG_ON(condition) do { if (condition) BUG(); } while(0) #endif /* BUG */ -#define likely(x) __builtin_expect(!!(x), 1) -#define unlikely(x) __builtin_expect(!!(x), 0) - #define PAGE_SIZE 4096 #endif