Patchwork [1/2] UBUNTU: ubuntu: Fix compile failures of dm-raid45

login
register
mail settings
Submitter Stefan Bader
Date June 4, 2012, 3:36 p.m.
Message ID <1338824171-17216-2-git-send-email-stefan.bader@canonical.com>
Download mbox | patch
Permalink /patch/162820/
State New
Headers show

Comments

Stefan Bader - June 4, 2012, 3:36 p.m.
Must include module.h explicitely now. Also remove one
compile time test which does not work anymore (will get
rid of a warning).

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 ubuntu/dm-raid4-5/dm-memcache.c |    1 +
 ubuntu/dm-raid4-5/dm-message.c  |    1 +
 ubuntu/dm-raid4-5/dm-raid4-5.c  |    5 +++++
 3 files changed, 7 insertions(+)

Patch

diff --git a/ubuntu/dm-raid4-5/dm-memcache.c b/ubuntu/dm-raid4-5/dm-memcache.c
index 1b15859..346abb4 100644
--- a/ubuntu/dm-raid4-5/dm-memcache.c
+++ b/ubuntu/dm-raid4-5/dm-memcache.c
@@ -19,6 +19,7 @@ 
 #include "dm-memcache.h"
 #include <linux/dm-io.h>
 #include <linux/slab.h>
+#include <linux/module.h>
 
 struct dm_mem_cache_client {
 	spinlock_t lock;
diff --git a/ubuntu/dm-raid4-5/dm-message.c b/ubuntu/dm-raid4-5/dm-message.c
index a66b015..de21e52 100644
--- a/ubuntu/dm-raid4-5/dm-message.c
+++ b/ubuntu/dm-raid4-5/dm-message.c
@@ -14,6 +14,7 @@ 
 #include "dm.h"
 #include "dm-message.h"
 #include <linux/kernel.h>
+#include <linux/module.h>
 
 #define DM_MSG_PREFIX	"dm_message"
 
diff --git a/ubuntu/dm-raid4-5/dm-raid4-5.c b/ubuntu/dm-raid4-5/dm-raid4-5.c
index 88db795..e05b0e1 100644
--- a/ubuntu/dm-raid4-5/dm-raid4-5.c
+++ b/ubuntu/dm-raid4-5/dm-raid4-5.c
@@ -54,6 +54,7 @@  static const char *version = "v0.2594b";
 #include "dm-region-hash.h"
 
 #include <linux/slab.h>
+#include <linux/module.h>
 
 /*
  * Configurable parameters
@@ -173,9 +174,13 @@  enum chunk_flags {
 	CHUNK_UPTODATE,		/* Chunk pages are uptodate. */
 };
 
+/*
+ * This does not work anymore with __REQ_* values being enums
+ *
 #if READ != 0 || WRITE != 1
 #error dm-raid45: READ/WRITE != 0/1 used as index!!!
 #endif
+*/
 
 enum bl_type {
 	WRITE_QUEUED = WRITE + 1,