Re: [dm-devel] Error when compiling drivers/md/dm-bufio.c
From: Witold Baryluk <hidden>
Date: 2011-11-07 16:32:15
Also in:
dm-devel
On 11-07 08:18, Linus Torvalds wrote:
On Mon, Nov 7, 2011 at 7:36 AM, Mikulas Patocka [off-list ref] wrote:quoted
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.
LinusRegards, Witek -- Witold Baryluk JID: witold.baryluk // jabster.pl
Attachments
- driver-md-include-module-h-export-h.patch [text/x-diff] 710 bytes · preview