[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140620153159.GA26048@kroah.com>
Date: Fri, 20 Jun 2014 08:31:59 -0700
From: Greg KH <gregkh@...uxfoundation.org>
To: Vincent Heuken <me@...centheuken.com>
Cc: thomas_75@...e-mail.net, paul.gortmaker@...driver.com,
himangi774@...il.com, arnd@...db.de, aybuke.147@...il.com,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: serqt_usb2: fixed frivolous else statement
warnings
On Fri, Jun 20, 2014 at 06:23:17AM -0700, Vincent Heuken wrote:
> This is a patch to the serqt_usb2.c file that fixes two instances
> of the following checkpatch.pl warning:
> WARNING: else is not generally useful after a break or return
>
> Signed-off-by: Vincent Heuken <me@...centheuken.com>
> ---
> drivers/staging/serqt_usb2/serqt_usb2.c | 44 ++++++++++++++++-----------------
> 1 file changed, 21 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c
> index 998c384..c356542 100644
> --- a/drivers/staging/serqt_usb2/serqt_usb2.c
> +++ b/drivers/staging/serqt_usb2/serqt_usb2.c
> @@ -981,9 +981,8 @@ static void qt_block_until_empty(struct tty_struct *tty,
> if (wait == 0) {
> dev_dbg(&qt_port->port->dev, "%s - TIMEOUT", __func__);
> return;
> - } else {
> - wait = 30;
> }
> + wait = 30;
> }
> }
>
> @@ -1132,25 +1131,24 @@ static int qt_ioctl(struct tty_struct *tty,
> #endif
> if (signal_pending(current))
> return -ERESTARTSYS;
> - else {
> - char diff = qt_port->diff_status;
> -
> - if (diff == 0)
> - return -EIO; /* no change => error */
> -
> - /* Consume all events */
> - qt_port->diff_status = 0;
> -
> - if (((arg & TIOCM_RNG)
> - && (diff & SERIAL_MSR_RI))
> - || ((arg & TIOCM_DSR)
> - && (diff & SERIAL_MSR_DSR))
> - || ((arg & TIOCM_CD)
> - && (diff & SERIAL_MSR_CD))
> - || ((arg & TIOCM_CTS)
> - && (diff & SERIAL_MSR_CTS))) {
> - return 0;
> - }
> +
> + char diff = qt_port->diff_status;
This change causes a compiler warning, please be more careful in your
patches. Can you fix this up and resend?
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists