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

Witold Baryluk baryluk at smp.if.uj.edu.pl
Mon Nov 7 16:32:15 UTC 2011


On 11-07 08:18, Linus Torvalds wrote:
> On Mon, Nov 7, 2011 at 7:36 AM, Mikulas Patocka <mpatocka at redhat.com> wrote:
> >
> > Yes, apply this patch:
> >
> > dm-bufio: Include <linux/module.h>
> 
> Actually, is just <linux/export.h> sufficient?

I changed include to <linux/export.h>, and dm-bufio.c
gives error 
  CC [M]  drivers/md/dm-bufio.o
drivers/md/dm-bufio.c:1677:63: error: expected ‘)’ before ‘ulong’
drivers/md/dm-bufio.c:1678:40: error: expected ‘)’ before string constant
drivers/md/dm-bufio.c:1680:55: error: expected ‘)’ before ‘uint’
drivers/md/dm-bufio.c:1681:35: error: expected ‘)’ before string constant
drivers/md/dm-bufio.c:1683:67: error: expected ‘)’ before ‘ulong’
drivers/md/dm-bufio.c:1684:40: error: expected ‘)’ before string constant
drivers/md/dm-bufio.c:1686:79: error: expected ‘)’ before ‘ulong’
drivers/md/dm-bufio.c:1687:46: error: expected ‘)’ before string constant
drivers/md/dm-bufio.c:1689:87: error: expected ‘)’ before ‘ulong’
drivers/md/dm-bufio.c:1690:50: error: expected ‘)’ before string constant
drivers/md/dm-bufio.c:1692:73: error: expected ‘)’ before ‘ulong’
drivers/md/dm-bufio.c:1693:43: error: expected ‘)’ before string constant
drivers/md/dm-bufio.c:1695:73: error: expected ‘)’ before ‘ulong’
drivers/md/dm-bufio.c:1696:43: error: expected ‘)’ before string constant
drivers/md/dm-bufio.c:1698:15: error: expected declaration specifiers or ‘...’ before string constant
drivers/md/dm-bufio.c:1699:20: error: expected declaration specifiers or ‘...’ before string constant
drivers/md/dm-bufio.c:1700:16: error: expected declaration specifiers or ‘...’ before string constant

It is using module_param_named, and MODULE_PARAM_DESC, MODULE_AUTHOR,
MODULE_DESCRIPTION, MODULE_LICENSE macros.
(and module_init() and module_exit() also).

However dm-space-map-checker.c compiles fine.

Update patch atached.


> 
> It's much better to use just export.h if you have the choice - lots of
> code doesn't need the whole module thing that brings in just about all
> the headers in the whole kernel (ok, not quite, but still..)
> 
> That was kind of the whole point of the split.
> 
>                   Linus

Regards,
Witek


-- 
Witold Baryluk
JID: witold.baryluk // jabster.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: driver-md-include-module-h-export-h.patch
Type: text/x-diff
Size: 710 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20111107/baf83331/attachment.bin>


More information about the dm-devel mailing list