[PATCH] usb: gadget: fix two sparse warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



drivers/usb/gadget/u_serial.c:1291:5: sparse: symbol \
	'userial_init' was not declared. Should it be static?
drivers/usb/gadget/zero.c:66:25: sparse: symbol \
	'gzero_options' was not declared. Should it be static?

Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
Signed-off-by: Felipe Balbi <balbi@xxxxxx>
---
 drivers/usb/gadget/u_serial.c | 2 +-
 drivers/usb/gadget/zero.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
index ea360fd..9e14079 100644
--- a/drivers/usb/gadget/u_serial.c
+++ b/drivers/usb/gadget/u_serial.c
@@ -1288,7 +1288,7 @@ void gserial_disconnect(struct gserial *gser)
 }
 EXPORT_SYMBOL_GPL(gserial_disconnect);
 
-int userial_init(void)
+static int userial_init(void)
 {
 	unsigned			i;
 	int				status;
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index a331ab1..685fa68 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -63,7 +63,7 @@ static const char longname[] = "Gadget Zero";
 static bool loopdefault = 0;
 module_param(loopdefault, bool, S_IRUGO|S_IWUSR);
 
-struct usb_zero_options gzero_options = {
+static struct usb_zero_options gzero_options = {
 	.isoc_interval = 4,
 	.isoc_maxpacket = 1024,
 	.bulk_buflen = 4096,
-- 
1.8.1.rc1.5.g7e0651a

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux