2013-04-18 06:05:54

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the usb tree

Hi Greg,

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

ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-usbat.ko] undefined!
ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-sddr55.ko] undefined!
ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-sddr09.ko] undefined!
ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-realtek.ko] undefined!
ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-karma.ko] undefined!
ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-jumpshot.ko] undefined!
ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-isd200.ko] undefined!
ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-freecom.ko] undefined!
ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-eneub6250.ko] undefined!
ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-datafab.ko] undefined!
ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-cypress.ko] undefined!
ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-alauda.ko] undefined!

Caused by commit 75b9130e8af6 ("usb: storage: Add usb_stor_dbg, reduce
object size"). Please build test such infrastructure patches with and
without MODULES ...

I have used the usb tree from next-20130417 for today.
--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (1.20 kB)
(No filename) (836.00 B)
Download all attachments

2013-04-18 16:06:41

by Joe Perches

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the usb tree

On Thu, 2013-04-18 at 16:05 +1000, Stephen Rothwell wrote:
> After merging the usb tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> ERROR: "usb_stor_dbg" [drivers/usb/storage/ums-usbat.ko] undefined!
[...]
> Caused by commit 75b9130e8af6 ("usb: storage: Add usb_stor_dbg, reduce
> object size"). Please build test such infrastructure patches with and
> without MODULES ...
>
> I have used the usb tree from next-20130417 for today.

Sorry 'bout that.

I did compilation allyesconfig and allmodconfig with
and without CONFIG_USB_STORAGE_VERBOSE and made
.ko's for that directory only but not a full link.

Looks like it needs EXPORT_SYMBOL_GPL(usb_stor_dbg) in
debug.c. It takes me quite a while to do a complete
allmodconfig build, but I'll check.

2013-04-18 21:17:18

by Joe Perches

[permalink] [raw]
Subject: [PATCH usb-next] usb: storage: Fix link error

Fix allmodconfig link error introduced by commit 75b9130e8a
("usb: storage: Add usb_stor_dbg, reduce object size")

Export the symbol usb_stor_dbg.
Add export.h

Signed-off-by: Joe Perches <[email protected]>
---
drivers/usb/storage/debug.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/usb/storage/debug.c b/drivers/usb/storage/debug.c
index b428129..29fe08f 100644
--- a/drivers/usb/storage/debug.c
+++ b/drivers/usb/storage/debug.c
@@ -43,6 +43,7 @@
*/

#include <linux/cdrom.h>
+#include <linux/export.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_dbg.h>
@@ -193,3 +194,4 @@ int usb_stor_dbg(const char *fmt, ...)

return r;
}
+EXPORT_SYMBOL_GPL(usb_stor_dbg);

2013-04-19 02:02:52

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH usb-next] usb: storage: Fix link error

On Thu, Apr 18, 2013 at 02:17:14PM -0700, Joe Perches wrote:
> Fix allmodconfig link error introduced by commit 75b9130e8a
> ("usb: storage: Add usb_stor_dbg, reduce object size")
>
> Export the symbol usb_stor_dbg.
> Add export.h
>
> Signed-off-by: Joe Perches <[email protected]>
> ---
> drivers/usb/storage/debug.c | 2 ++
> 1 file changed, 2 insertions(+)

You forgot the "Reported-by:" line :(

I'll go add it now, thanks for the quick fix-up patch.

greg k-h