Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=12c3cbbb7e3218b1c3ed4c97b3496fc3f94ea967 Commit: 12c3cbbb7e3218b1c3ed4c97b3496fc3f94ea967 Parent: df5d438e33d7fc914ba9b6e0d6b019a8966c5fcc Author: Roland McGrath <[EMAIL PROTECTED]> AuthorDate: Wed Jan 30 13:30:45 2008 +0100 Committer: Ingo Molnar <[EMAIL PROTECTED]> CommitDate: Wed Jan 30 13:30:45 2008 +0100
x86: desc_empty This replaces the desc_empty macro with an inline. It now handles easily any of the four different types used between 32/64 code to refer to these 8 bytes. It's identical in both asm-x86/processor_64.h and asm-x86/processor_32.h, so if these files ever get merged this function can be in the common code. This also removes the desc_equal macro because nothing uses it. Signed-off-by: Roland McGrath <[EMAIL PROTECTED]> Cc: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]> Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]> --- include/asm-x86/processor_32.h | 9 +++++---- include/asm-x86/processor_64.h | 10 +++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/asm-x86/processor_32.h b/include/asm-x86/processor_32.h index 3b51a18..2540bf8 100644 --- a/include/asm-x86/processor_32.h +++ b/include/asm-x86/processor_32.h @@ -28,11 +28,12 @@ struct desc_struct { unsigned long a,b; }; -#define desc_empty(desc) \ - (!((desc)->a | (desc)->b)) +static inline int desc_empty(const void *ptr) +{ + const u32 *desc = ptr; + return !(desc[0] | desc[1]); +} -#define desc_equal(desc1, desc2) \ - (((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b)) /* * Default implementation of macro that returns current * instruction pointer ("program counter"). diff --git a/include/asm-x86/processor_64.h b/include/asm-x86/processor_64.h index 2ae8ceb..20d8935 100644 --- a/include/asm-x86/processor_64.h +++ b/include/asm-x86/processor_64.h @@ -30,11 +30,11 @@ #define VIP_MASK 0x00100000 /* virtual interrupt pending */ #define ID_MASK 0x00200000 -#define desc_empty(desc) \ - (!((desc)->a | (desc)->b)) - -#define desc_equal(desc1, desc2) \ - (((desc1)->a == (desc2)->a) && ((desc1)->b == (desc2)->b)) +static inline int desc_empty(const void *ptr) +{ + const u32 *desc = ptr; + return !(desc[0] | desc[1]); +} /* * Default implementation of macro that returns current - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html