Skip to contentSkip to conversation

USB: option: Remove unused variable

PATCH New Carlos R. Mafra 1 participant 1 message Jul 13, 2009

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

PATCH 1/1 USB: option: Remove unused variable

Quoted 1 line

From f600eacfbca47d286e549d1be36bf07b9e2479e2 Mon Sep 17 00:00:00 2001

From: Carlos R. Mafra <[email protected]>
Date: Mon, 13 Jul 2009 21:28:24 +0200
Subject: [PATCH] USB: option: Remove unused variable

After commit f092c240494f2d807401d93f95f683909b90af96 ("USB: option:
remove unnecessary and erroneous code") the variable 'serial' becomes unused, as gcc-4.3.2 points out:

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'

So I removed it.

---
 drivers/usb/serial/option.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
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;
 
Signature · 1 line
1.6.2.4