From: Joerg Roedel Date: Wed, 30 Jul 2008 05:33:42 +0000 (-0700) Subject: introduce lower_32_bits() macro X-Git-Tag: v2.6.27-rc2~172 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=204b885e7322656284626949e51f292fe61313fa;p=linux-2.6 introduce lower_32_bits() macro The file kernel.h contains the upper_32_bits macro. This patch adds the other part, the lower_32_bits macro. Its first use will be in the driver for AMD IOMMU. Cc: H. Peter Anvin Signed-off-by: Joerg Roedel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/kernel.h b/include/linux/kernel.h index fdbbf72ca2..aaa998f65c 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -75,6 +75,12 @@ extern const char linux_proc_banner[]; */ #define upper_32_bits(n) ((u32)(((n) >> 16) >> 16)) +/** + * lower_32_bits - return bits 0-31 of a number + * @n: the number we're accessing + */ +#define lower_32_bits(n) ((u32)(n)) + #define KERN_EMERG "<0>" /* system is unusable */ #define KERN_ALERT "<1>" /* action must be taken immediately */ #define KERN_CRIT "<2>" /* critical conditions */