[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <003f01cbf81a$f48cfdf0$dda6f9d0$@mprc.pku.edu.cn>
Date: Mon, 11 Apr 2011 15:34:55 +0800
From: "Guan Xuetao" <gxt@...c.pku.edu.cn>
To: "Arnd Bergmann" <arnd@...db.de>
Cc: <linux-kernel@...r.kernel.org>, <linux-arch@...r.kernel.org>
Subject: about __BITS_PER_LONG
Hi, Arnd:
When using asm-generic/bitsperlong.h, I think that __BITS_PER_LONG could be the
same as BITS_PER_LONG if-not-defined. And this could avoid the duplicated macros
in almost all architectures.
Regards.
Guan Xuetao
---
diff --git a/include/asm-generic/bitsperlong.h b/include/asm-generic/bitsperlong.h
index 4ae54e0..31d032a 100644
--- a/include/asm-generic/bitsperlong.h
+++ b/include/asm-generic/bitsperlong.h
@@ -9,7 +9,11 @@
* to decide it, but rather check a compiler provided macro.
*/
#ifndef __BITS_PER_LONG
-#define __BITS_PER_LONG 32
+# ifdef CONFIG_64BIT
+# define __BITS_PER_LONG 64
+# else
+# define __BITS_PER_LONG 32
+# endif /* CONFIG_64BIT */
#endif
#ifdef __KERNEL__
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists