lkml.org 
[lkml]   [2011]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subjectabout __BITS_PER_LONG
Date
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__


\
 
 \ /
  Last update: 2011-04-11 09:37    [W:0.038 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site