From: Matthias Kaehlcke <matthias@kaehlcke.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] move definition of macros likely and unlikely to compiler.h
Date: Tue, 22 Dec 2009 23:05:45 +0100 [thread overview]
Message-ID: <20091222220545.GH32054@darwin> (raw)
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 | 3 +++
include/linux/mtd/compat.h | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/compiler.h b/include/compiler.h
index e602cce..332618e 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 f0c8464..39c693f 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
--
1.6.3.1
next reply other threads:[~2009-12-22 22:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-22 22:05 Matthias Kaehlcke [this message]
2010-01-17 23:29 ` [U-Boot] [PATCH] move definition of macros likely and unlikely to compiler.h Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091222220545.GH32054@darwin \
--to=matthias@kaehlcke.net \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox