* [PATCH -next] USB: serial: quatech2: remove set but not used variable 'port_priv'
@ 2018-10-11 7:44 ` YueHaibing
0 siblings, 0 replies; 3+ messages in thread
From: YueHaibing @ 2018-10-11 7:44 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman; +Cc: YueHaibing, linux-usb, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/usb/serial/quatech2.c: In function 'qt2_process_read_urb':
drivers/usb/serial/quatech2.c:503:27: warning:
variable 'port_priv' set but not used [-Wunused-but-set-variable]
It not used any more after
commit 2be818a116b2 ("Revert "USB: quatech2: only write to the tty if the port is open."")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/usb/serial/quatech2.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c
index f2fbe1e..a62981c 100644
--- a/drivers/usb/serial/quatech2.c
+++ b/drivers/usb/serial/quatech2.c
@@ -500,7 +500,6 @@ static void qt2_process_read_urb(struct urb *urb)
struct usb_serial *serial;
struct qt2_serial_private *serial_priv;
struct usb_serial_port *port;
- struct qt2_port_private *port_priv;
bool escapeflag;
unsigned char *ch;
int i;
@@ -514,7 +513,6 @@ static void qt2_process_read_urb(struct urb *urb)
serial = urb->context;
serial_priv = usb_get_serial_data(serial);
port = serial->port[serial_priv->current_port];
- port_priv = usb_get_serial_port_data(port);
for (i = 0; i < urb->actual_length; i++) {
ch = (unsigned char *)urb->transfer_buffer + i;
@@ -566,7 +564,6 @@ static void qt2_process_read_urb(struct urb *urb)
serial_priv->current_port = newport;
port = serial->port[serial_priv->current_port];
- port_priv = usb_get_serial_port_data(port);
i += 3;
escapeflag = true;
break;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [-next] USB: serial: quatech2: remove set but not used variable 'port_priv'
@ 2018-10-11 7:44 ` YueHaibing
0 siblings, 0 replies; 3+ messages in thread
From: YueHaibing @ 2018-10-11 7:44 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman; +Cc: YueHaibing, linux-usb, kernel-janitors
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/usb/serial/quatech2.c: In function 'qt2_process_read_urb':
drivers/usb/serial/quatech2.c:503:27: warning:
variable 'port_priv' set but not used [-Wunused-but-set-variable]
It not used any more after
commit 2be818a116b2 ("Revert "USB: quatech2: only write to the tty if the port is open."")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/usb/serial/quatech2.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c
index f2fbe1e..a62981c 100644
--- a/drivers/usb/serial/quatech2.c
+++ b/drivers/usb/serial/quatech2.c
@@ -500,7 +500,6 @@ static void qt2_process_read_urb(struct urb *urb)
struct usb_serial *serial;
struct qt2_serial_private *serial_priv;
struct usb_serial_port *port;
- struct qt2_port_private *port_priv;
bool escapeflag;
unsigned char *ch;
int i;
@@ -514,7 +513,6 @@ static void qt2_process_read_urb(struct urb *urb)
serial = urb->context;
serial_priv = usb_get_serial_data(serial);
port = serial->port[serial_priv->current_port];
- port_priv = usb_get_serial_port_data(port);
for (i = 0; i < urb->actual_length; i++) {
ch = (unsigned char *)urb->transfer_buffer + i;
@@ -566,7 +564,6 @@ static void qt2_process_read_urb(struct urb *urb)
serial_priv->current_port = newport;
port = serial->port[serial_priv->current_port];
- port_priv = usb_get_serial_port_data(port);
i += 3;
escapeflag = true;
break;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] USB: serial: quatech2: remove set but not used variable 'port_priv'
@ 2018-11-12 9:09 Johan Hovold
0 siblings, 0 replies; 3+ messages in thread
From: Johan Hovold @ 2018-11-12 9:09 UTC (permalink / raw)
To: YueHaibing; +Cc: Johan Hovold, Greg Kroah-Hartman, linux-usb, kernel-janitors
On Thu, Oct 11, 2018 at 07:44:33AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/usb/serial/quatech2.c: In function 'qt2_process_read_urb':
> drivers/usb/serial/quatech2.c:503:27: warning:
> variable 'port_priv' set but not used [-Wunused-but-set-variable]
>
> It not used any more after
> commit 2be818a116b2 ("Revert "USB: quatech2: only write to the tty if the port is open."")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Now applied. Thanks for including the not-used-since information.
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-12 9:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-11 7:44 [PATCH -next] USB: serial: quatech2: remove set but not used variable 'port_priv' YueHaibing
2018-10-11 7:44 ` [-next] " YueHaibing
2018-11-12 9:09 [PATCH -next] " Johan Hovold
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.