]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
move definition of macros likely and unlikely to compiler.h
authorMatthias Kaehlcke <matthias@kaehlcke.net>
Tue, 22 Dec 2009 22:05:45 +0000 (23:05 +0100)
committerWolfgang Denk <wd@denx.de>
Sun, 17 Jan 2010 23:28:27 +0000 (00:28 +0100)
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 <matthias@kaehlcke.net>
include/compiler.h
include/linux/mtd/compat.h

index e602cce2e9b99fc5f86b6523972ec909bf127fa1..332618e9de9c04282433030c87b1b2272556ccb5 100644 (file)
@@ -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
index f0c8464db5a47b5517f8117f001bb92c0f8338cc..39c693f7a8c0a50ab1addfe1b90696908dd373e1 100644 (file)
@@ -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