From: Greg KH <gregkh@linuxfoundation.org>
To: Saurav Girepunje <saurav.girepunje@gmail.com>
Cc: gustavo@embeddedor.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, saurav.girepunje@hotmail.com
Subject: Re: [PATCH] usb: isp1760: isp1760-hcd.c: Drop condition with no effect
Date: Mon, 4 Nov 2019 15:48:45 +0100 [thread overview]
Message-ID: <20191104144845.GC2183570@kroah.com> (raw)
In-Reply-To: <20191028211214.GA30014@saurav>
On Tue, Oct 29, 2019 at 02:42:14AM +0530, Saurav Girepunje wrote:
> As the "else if" and "else" branch body are identical the condition
> has no effect. So drop the "else if" condition.
>
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> ---
> drivers/usb/isp1760/isp1760-hcd.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/usb/isp1760/isp1760-hcd.c b/drivers/usb/isp1760/isp1760-hcd.c
> index 320fc4739835..579a21bd70ad 100644
> --- a/drivers/usb/isp1760/isp1760-hcd.c
> +++ b/drivers/usb/isp1760/isp1760-hcd.c
> @@ -1032,8 +1032,6 @@ static int check_atl_transfer(struct usb_hcd *hcd, struct ptd *ptd,
> urb->status = -EOVERFLOW;
> else if (FROM_DW3_CERR(ptd->dw3))
> urb->status = -EPIPE; /* Stall */
> - else if (ptd->dw3 & DW3_ERROR_BIT)
> - urb->status = -EPROTO; /* XactErr */
> else
> urb->status = -EPROTO; /* Unknown */
Yes, the same thing happens, but look at the comment, this is two
different things. So the code is good as-is.
thanks,
greg k-h
prev parent reply other threads:[~2019-11-04 14:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 21:12 Saurav Girepunje
2019-11-04 14:48 ` Greg KH [this message]
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=20191104144845.GC2183570@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=gustavo@embeddedor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=saurav.girepunje@gmail.com \
--cc=saurav.girepunje@hotmail.com \
/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
all inboxes | Powered by JetHome®