Skip to contentSkip to conversation

move definition of macros likely and unlikely to compiler.h

PATCH New Matthias Kaehlcke 2 participants 2 messages Dec 22, 2009 – Jan 17, 2010 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 include/compiler.h         |    3 +++
 include/linux/mtd/compat.h |    3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)
include/compiler.h +3 -0
index e602cce..332618e 100644
@@ -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
include/linux/mtd/compat.h +0 -3
index f0c8464..39c693f 100644
@@ -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
Signature · 1 line
1.6.3.1
#1 lore raw

PATCH 1/1 move definition of macros likely and unlikely to compiler.h

Dear Matthias Kaehlcke,

Quoted 8 lines · In message <20091222220545.GH32054@darwin> you wrote:

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

---
 include/compiler.h         |    3 +++
 include/linux/mtd/compat.h |    3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
When the ax entered the forest, the trees said, "The handle is one of
us!"                                               -- Turkish proverb