All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 -next] USB: cypress_m8: remove set but not used variables 'iflag'
@ 2018-10-04  7:09 ` YueHaibing
  0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-10-04  6:58 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/cypress_m8.c: In function 'cypress_set_termios':
drivers/usb/serial/cypress_m8.c:866:18: warning:
 variable 'iflag' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: only fix 'iflag' warning
---
 drivers/usb/serial/cypress_m8.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 31c6091..8236997 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -863,7 +863,7 @@ static void cypress_set_termios(struct tty_struct *tty,
 	struct cypress_private *priv = usb_get_serial_port_data(port);
 	struct device *dev = &port->dev;
 	int data_bits, stop_bits, parity_type, parity_enable;
-	unsigned cflag, iflag;
+	unsigned int cflag;
 	unsigned long flags;
 	__u8 oldlines;
 	int linechange = 0;
@@ -899,7 +899,6 @@ static void cypress_set_termios(struct tty_struct *tty,
 	tty->termios.c_cflag &= ~(CMSPAR|CRTSCTS);
 
 	cflag = tty->termios.c_cflag;
-	iflag = tty->termios.c_iflag;
 
 	/* check if there are new settings */
 	if (old_termios) {

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

* [v2,-next] USB: cypress_m8: remove set but not used variables 'iflag'
@ 2018-10-04  7:09 ` YueHaibing
  0 siblings, 0 replies; 4+ messages in thread
From: YueHaibing @ 2018-10-04  7:09 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/cypress_m8.c: In function 'cypress_set_termios':
drivers/usb/serial/cypress_m8.c:866:18: warning:
 variable 'iflag' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: only fix 'iflag' warning
---
 drivers/usb/serial/cypress_m8.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 31c6091..8236997 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -863,7 +863,7 @@ static void cypress_set_termios(struct tty_struct *tty,
 	struct cypress_private *priv = usb_get_serial_port_data(port);
 	struct device *dev = &port->dev;
 	int data_bits, stop_bits, parity_type, parity_enable;
-	unsigned cflag, iflag;
+	unsigned int cflag;
 	unsigned long flags;
 	__u8 oldlines;
 	int linechange = 0;
@@ -899,7 +899,6 @@ static void cypress_set_termios(struct tty_struct *tty,
 	tty->termios.c_cflag &= ~(CMSPAR|CRTSCTS);
 
 	cflag = tty->termios.c_cflag;
-	iflag = tty->termios.c_iflag;
 
 	/* check if there are new settings */
 	if (old_termios) {

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

* Re: [PATCH v2 -next] USB: cypress_m8: remove set but not used variables 'iflag'
@ 2018-10-05 13:40   ` Johan Hovold
  0 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2018-10-05 13:40 UTC (permalink / raw)
  To: YueHaibing; +Cc: Johan Hovold, Greg Kroah-Hartman, linux-usb, kernel-janitors

On Thu, Oct 04, 2018 at 07:09:53AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/usb/serial/cypress_m8.c: In function 'cypress_set_termios':
> drivers/usb/serial/cypress_m8.c:866:18: warning:
>  variable 'iflag' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> v2: only fix 'iflag' warning

Now applied, thanks.

Johan

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

* [v2,-next] USB: cypress_m8: remove set but not used variables 'iflag'
@ 2018-10-05 13:40   ` Johan Hovold
  0 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2018-10-05 13:40 UTC (permalink / raw)
  To: YueHaibing; +Cc: Johan Hovold, Greg Kroah-Hartman, linux-usb, kernel-janitors

On Thu, Oct 04, 2018 at 07:09:53AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/usb/serial/cypress_m8.c: In function 'cypress_set_termios':
> drivers/usb/serial/cypress_m8.c:866:18: warning:
>  variable 'iflag' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> v2: only fix 'iflag' warning

Now applied, thanks.

Johan

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

end of thread, other threads:[~2018-10-05 13:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04  6:58 [PATCH v2 -next] USB: cypress_m8: remove set but not used variables 'iflag' YueHaibing
2018-10-04  7:09 ` [v2,-next] " YueHaibing
2018-10-05 13:40 ` [PATCH v2 -next] " Johan Hovold
2018-10-05 13:40   ` [v2,-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.