public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/usb/serial/option.c compiler warning
@ 2009-07-15  6:23 Jaswinder Singh Rajput
  2009-07-16 22:00 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Jaswinder Singh Rajput @ 2009-07-15  6:23 UTC (permalink / raw)
  To: Matthias Urlichs, Andrew Morton, Greg KH, LKML

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 :

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 98262dd..77b9563 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: drivers/usb/serial/option.c compiler warning
  2009-07-15  6:23 drivers/usb/serial/option.c compiler warning Jaswinder Singh Rajput
@ 2009-07-16 22:00 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2009-07-16 22:00 UTC (permalink / raw)
  To: Jaswinder Singh Rajput; +Cc: Matthias Urlichs, Andrew Morton, LKML

On Wed, Jul 15, 2009 at 11:53:47AM +0530, Jaswinder Singh Rajput wrote:
> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-16 22:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15  6:23 drivers/usb/serial/option.c compiler warning Jaswinder Singh Rajput
2009-07-16 22:00 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox