[Ocfs2-commits] manish commits r2230 - trunk/fs/ocfs2/cluster
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu May 12 17:11:59 CDT 2005
Author: manish
Signed-off-by: zab
Date: 2005-05-12 17:11:57 -0500 (Thu, 12 May 2005)
New Revision: 2230
Modified:
trunk/fs/ocfs2/cluster/masklog.h
Log:
make mlog sparse safe
Signed-off-by: zab
Modified: trunk/fs/ocfs2/cluster/masklog.h
===================================================================
--- trunk/fs/ocfs2/cluster/masklog.h 2005-05-12 21:05:10 UTC (rev 2229)
+++ trunk/fs/ocfs2/cluster/masklog.h 2005-05-12 22:11:57 UTC (rev 2230)
@@ -126,21 +126,22 @@
#if BITS_PER_LONG == 32
-#define __mlog_test_u64(mask, bits) \
- ( (u32)(mask) & bits.words[0] || ((u64)(mask) >> 32) & bits.words[1] )
-#define __mlog_set_u64(mask, bits) do { \
- bits.words[0] |= (u32)(mask); \
- bits.words[1] |= (u64)(mask) >> 32; \
+#define __mlog_test_u64(mask, bits) \
+ ( (u32)(mask & 0xffffffff) & bits.words[0] || \
+ ((u64)(mask) >> 32) & bits.words[1] )
+#define __mlog_set_u64(mask, bits) do { \
+ bits.words[0] |= (u32)(mask & 0xffffffff); \
+ bits.words[1] |= (u64)(mask) >> 32; \
} while (0)
-#define __mlog_clear_u64(mask, bits) do { \
- bits.words[0] &= ~((u32)(mask)); \
- bits.words[1] &= ~((u64)(mask) >> 32); \
+#define __mlog_clear_u64(mask, bits) do { \
+ bits.words[0] &= ~((u32)(mask & 0xffffffff)); \
+ bits.words[1] &= ~((u64)(mask) >> 32); \
} while (0)
-#define MLOG_BITS_RHS(mask) { \
- { \
- [0] = (u32)(mask), \
- [1] = (u64)(mask) >> 32,\
- } \
+#define MLOG_BITS_RHS(mask) { \
+ { \
+ [0] = (u32)(mask & 0xffffffff), \
+ [1] = (u64)(mask) >> 32, \
+ } \
}
#else /* 32bit long above, 64bit long below */
@@ -197,6 +198,10 @@
mlog(ML_ENTRY, "ENTRY:\n"); \
} while (0)
+/* We disable this since sparse doesn't handle the
+ * __builtin_types_compatible_p stuff just yet.
+ */
+#ifndef __CHECKER__
#define mlog_exit(st) do { \
if (__builtin_types_compatible_p(typeof(st), unsigned long)) \
mlog(ML_EXIT, "EXIT: %lu\n", (unsigned long) (st)); \
@@ -215,6 +220,9 @@
else \
mlog(ML_EXIT, "EXIT: %llu\n", (unsigned long long) (st)); \
} while (0)
+#else
+#define mlog_exit(st) do { (void)(st); } while (0)
+#endif
#define mlog_exit_ptr(ptr) do { \
mlog(ML_EXIT, "EXIT: %p\n", ptr); \
More information about the Ocfs2-commits
mailing list