From: Greg KH <gregkh@linuxfoundation.org>
To: Vincent Heuken <me@vincentheuken.com>
Cc: thomas_75@safe-mail.net, himangi774@gmail.com,
paul.gortmaker@windriver.com, aybuke.147@gmail.com,
arnd@arndb.de, 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 09:43:47 -0700 [thread overview]
Message-ID: <20140620164347.GA23197@kroah.com> (raw)
In-Reply-To: <1403281888-12873-1-git-send-email-me@vincentheuken.com>
On Fri, Jun 20, 2014 at 09:31:28AM -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 | 47 +++++++++++++++++----------------
> 1 file changed, 24 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c
> index 998c384..98e9736 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;
> }
> }
>
> @@ -1130,27 +1129,29 @@ static int qt_ioctl(struct tty_struct *tty,
> /* this never wakes up */
> interruptible_sleep_on(&qt_port->msr_wait);
> #endif
> +
> + char diff;
A variable definition should be at the beginning of the function, not in
the middle.
thanks,
greg k-h
next prev parent reply other threads:[~2014-06-20 16:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 16:31 Vincent Heuken
2014-06-20 16:43 ` Greg KH [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-06-20 16:49 Vincent Heuken
2014-06-20 13:23 Vincent Heuken
2014-06-20 15:31 ` Greg KH
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=20140620164347.GA23197@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