From: Greg KH <gregkh@linuxfoundation.org>
To: Vincent Heuken <me@vincentheuken.com>
Cc: thomas_75@safe-mail.net, paul.gortmaker@windriver.com,
himangi774@gmail.com, arnd@arndb.de, aybuke.147@gmail.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: serqt_usb2: fixed frivolous else statement warnings
Date: Fri, 20 Jun 2014 08:31:59 -0700 [thread overview]
Message-ID: <20140620153159.GA26048@kroah.com> (raw)
In-Reply-To: <1403270597-21694-1-git-send-email-me@vincentheuken.com>
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@vincentheuken.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
next prev parent reply other threads:[~2014-06-20 15:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 13:23 Vincent Heuken
2014-06-20 15:31 ` Greg KH [this message]
2014-06-20 16:31 Vincent Heuken
2014-06-20 16:43 ` Greg KH
2014-06-20 16:49 Vincent Heuken
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140620153159.GA26048@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=aybuke.147@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=himangi774@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=me@vincentheuken.com \
--cc=paul.gortmaker@windriver.com \
--cc=thomas_75@safe-mail.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome