Skip to contentSkip to conversation

Fix non-debug build for random32() use

PATCH In review David Chinner 2 participants 2 messages Apr 30, 2008 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix non-debug build for random32() use

Include linux/random.h in all builds, not just debug.

---
 fs/xfs/linux-2.6/xfs_linux.h |    1 +
 fs/xfs/support/debug.h       |    2 --
 2 files changed, 1 insertion(+), 2 deletions(-)
fs/xfs/linux-2.6/xfs_linux.h +1 -0
Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_linux.h
===================================================================
@@ -75,6 +75,7 @@
 #include <linux/delay.h>
 #include <linux/log2.h>
 #include <linux/spinlock.h>
+#include <linux/random.h>
 
 #include <asm/page.h>
 #include <asm/div64.h>
fs/xfs/support/debug.h +0 -2
Index: 2.6.x-xfs-new/fs/xfs/support/debug.h
===================================================================
@@ -49,8 +49,6 @@ extern void assfail(char *expr, char *f,
 
 #else /* DEBUG */
 
-#include <linux/random.h>
-
 #define ASSERT(expr)	\
 	(unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__))
 
#1 lore raw

Looks good to me.

Quoted 34 lines · David Chinner

Include linux/random.h in all builds, not just debug.

---
 fs/xfs/linux-2.6/xfs_linux.h |    1 +
 fs/xfs/support/debug.h       |    2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

Index: 2.6.x-xfs-new/fs/xfs/linux-2.6/xfs_linux.h
===================================================================

fs/xfs/linux-2.6/xfs_linux.h +1 -0
@@ -75,6 +75,7 @@
 #include <linux/delay.h>
 #include <linux/log2.h>
 #include <linux/spinlock.h>
+#include <linux/random.h>
 
 #include <asm/page.h>
 #include <asm/div64.h>

Index: 2.6.x-xfs-new/fs/xfs/support/debug.h
===================================================================

fs/xfs/support/debug.h +0 -2
@@ -49,8 +49,6 @@ extern void assfail(char *expr, char *f,
 
 #else /* DEBUG */
 
-#include <linux/random.h>
-
 #define ASSERT(expr)	\
 	(unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__))