Thread (10 messages) 10 messages, 4 authors, 2011-11-07

Re: [dm-devel] Error when compiling drivers/md/dm-bufio.c

From: Witold Baryluk <hidden>
Date: 2011-11-07 16:15:14
Also in: dm-devel

On 11-07 10:36, Mikulas Patocka wrote:
quoted hunk ↗ jump to hunk

On Mon, 7 Nov 2011, Alasdair G Kergon wrote:
quoted
On Mon, Nov 07, 2011 at 09:22:31AM +0100, Witold Baryluk wrote:
quoted
I just got error on todays Linus' tree
  CC [M]  drivers/md/dm-bufio.o
drivers/md/dm-bufio.c:988:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’ [-Wimplicit-int]
Probably related to this merge:
  commit 32aaeffbd4a7457bf2f7448b33b5946ff2a960eb
  Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/ker

Previously module.h was included via another header file.
Now, bufio.c needs an explicit

#include <linux/module.h>

Alasdair
Yes, apply this patch:

dm-bufio: Include <linux/module.h>

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

---
 drivers/md/dm-bufio.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6-compile/drivers/md/dm-bufio.c
===================================================================
--- linux-2.6-compile.orig/drivers/md/dm-bufio.c	2011-11-07 16:31:34.000000000 +0100
+++ linux-2.6-compile/drivers/md/dm-bufio.c	2011-11-07 16:31:41.000000000 +0100
@@ -8,6 +8,7 @@
 
 #include "dm-bufio.h"
 
+#include <linux/module.h>
 #include <linux/device-mapper.h>
 #include <linux/dm-io.h>
 #include <linux/slab.h>
Mikulas
Compiles.

However, I get similar warnings (not errors this times,
because only variables are used probably, and implicitly used as ints)

  CC [M]  drivers/md/persistent-data/dm-space-map-checker.o
drivers/md/persistent-data/dm-space-map-checker.c:427:1: warning: data definition has no type or storage class [enabled by default]
drivers/md/persistent-data/dm-space-map-checker.c:427:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’ [-Wimplicit-int]
drivers/md/persistent-data/dm-space-map-checker.c:427:1: warning: parameter names (without types) in function declaration [enabled by default]
drivers/md/persistent-data/dm-space-map-checker.c:433:1: warning: data definition has no type or storage class [enabled by default]
drivers/md/persistent-data/dm-space-map-checker.c:433:1: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’ [-Wimplicit-int]
drivers/md/persistent-data/dm-space-map-checker.c:433:1: warning: parameter names (without types) in function declaration [enabled by default]
  CC [M]  drivers/md/persistent-data/dm-space-map-common.o

Adding similar include to dm-space-map-checker.c, resolves problem.

No further problems found (however I do not have all CONFIG_DM_* enabled).

Regards,
Witek



-- 
Witold Baryluk
JID: witold.baryluk // jabster.pl
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help