Skip to contentSkip to conversation

drivers/usb/serial/option.c compiler warning

PATCH Jaswinder Singh Rajput 2 participants 2 messages Jul 15, 2009 – Jul 16, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I am getting compiler warning in linus tree:

CC [M] drivers/usb/serial/option.o
drivers/usb/serial/option.c: In function ‘option_instat_callback’:
drivers/usb/serial/option.c:834: warning: unused variable ‘serial’ drivers/usb/serial/option.c: In function ‘option_open’:
drivers/usb/serial/option.c:930: warning: unused variable ‘serial’

This fixes the warning in my case, hope this will be helpful :

drivers/usb/serial/option.c +0 -2
index 98262dd..77b9563 100644
@@ -831,7 +831,6 @@ static void option_instat_callback(struct urb *urb)
 	int status = urb->status;
 	struct usb_serial_port *port =  urb->context;
 	struct option_port_private *portdata = usb_get_serial_port_data(port);
-	struct usb_serial *serial = port->serial;
 
 	dbg("%s", __func__);
 	dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata);
@@ -927,7 +926,6 @@ static int option_open(struct tty_struct *tty,
 			struct usb_serial_port *port, struct file *filp)
 {
 	struct option_port_private *portdata;
-	struct usb_serial *serial = port->serial;
 	int i, err;
 	struct urb *urb;
 

--
JSR

#1 lore raw
Quoted 9 lines · Jaswinder Singh Rajput

I am getting compiler warning in linus tree:

CC [M] drivers/usb/serial/option.o
drivers/usb/serial/option.c: In function ‘option_instat_callback’:
drivers/usb/serial/option.c:834: warning: unused variable ‘serial’ drivers/usb/serial/option.c: In function ‘option_open’:
drivers/usb/serial/option.c:930: warning: unused variable ‘serial’

This fixes the warning in my case, hope this will be helpful :

Hm, you forgot a Signed-off-by: line, and someone beat you to sending this change to me a few hours earlier, sorry.

thanks,

greg k-h