linux-next: build failure after merge of the moduleh tree

From: Stephen Rothwell
Date: Wed Sep 28 2011 - 04:00:16 EST


Hi Paul,

After merging the moduleh tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/nfc/nfcwilink.c:318:12: error: 'THIS_MODULE' undeclared here (not in a function)
drivers/nfc/nfcwilink.c:340:15: error: expected declaration specifiers or '...' before string constant
drivers/nfc/nfcwilink.c:340:1: warning: data definition has no type or storage class
drivers/nfc/nfcwilink.c:340:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/nfc/nfcwilink.c:340:15: warning: function declaration isn't a prototype
drivers/nfc/nfcwilink.c:341:20: error: expected declaration specifiers or '...' before string constant
drivers/nfc/nfcwilink.c:341:1: warning: data definition has no type or storage class
drivers/nfc/nfcwilink.c:341:1: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/nfc/nfcwilink.c:341:20: warning: function declaration isn't a prototype
drivers/nfc/nfcwilink.c:342:16: error: expected declaration specifiers or '...' before string constant
drivers/nfc/nfcwilink.c:342:1: warning: data definition has no type or storage class
drivers/nfc/nfcwilink.c:342:1: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/nfc/nfcwilink.c:342:16: warning: function declaration isn't a prototype

Caused by commit 93aead46428d ("NFC: driver for TI shared transport")
from the wireless tree interacting with the module.h split up.

I applied the patch below for today (which should be applied to the
wireless tree).

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Wed, 28 Sep 2011 17:56:29 +1000
Subject: [PATCH] NFC: use of module facilities requires the inclusion of
module.h

Otherwise the module.h split up produces this build failure:

drivers/nfc/nfcwilink.c:318:12: error: 'THIS_MODULE' undeclared here (not in a function)
drivers/nfc/nfcwilink.c:340:15: error: expected declaration specifiers or '...' before string constant
drivers/nfc/nfcwilink.c:340:1: warning: data definition has no type or storage class
drivers/nfc/nfcwilink.c:340:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/nfc/nfcwilink.c:340:15: warning: function declaration isn't a prototype
drivers/nfc/nfcwilink.c:341:20: error: expected declaration specifiers or '...' before string constant
drivers/nfc/nfcwilink.c:341:1: warning: data definition has no type or storage class
drivers/nfc/nfcwilink.c:341:1: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/nfc/nfcwilink.c:341:20: warning: function declaration isn't a prototype
drivers/nfc/nfcwilink.c:342:16: error: expected declaration specifiers or '...' before string constant
drivers/nfc/nfcwilink.c:342:1: warning: data definition has no type or storage class
drivers/nfc/nfcwilink.c:342:1: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/nfc/nfcwilink.c:342:16: warning: function declaration isn't a prototype

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
drivers/nfc/nfcwilink.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/nfc/nfcwilink.c b/drivers/nfc/nfcwilink.c
index 5b0f1ff..06c3642 100644
--- a/drivers/nfc/nfcwilink.c
+++ b/drivers/nfc/nfcwilink.c
@@ -27,6 +27,7 @@
*
*/
#include <linux/platform_device.h>
+#include <linux/module.h>
#include <linux/nfc.h>
#include <net/nfc/nci.h>
#include <net/nfc/nci_core.h>
--
1.7.6.3

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/