From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Geyslan G. Bem" <geyslan@gmail.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
Peter Senna Tschudin <peter.senna@gmail.com>,
Alan Stern <stern@rowland.harvard.edu>,
linux-usb@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return
Date: Wed, 9 Dec 2015 15:22:00 -0500 [thread overview]
Message-ID: <20151209202200.GA11593@kroah.com> (raw)
In-Reply-To: <CAGG-pUS1xs-MN1gfm_czqgRjY1wkrpR6YdmGoTdpzsGHQj9UPg@mail.gmail.com>
On Wed, Dec 09, 2015 at 05:15:43PM -0300, Geyslan G. Bem wrote:
> 2015-12-09 17:10 GMT-03:00 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>:
> > Hello.
> >
> > On 12/09/2015 10:57 PM, Geyslan G. Bem wrote:
> >
> >> This patch removes the return of the default switch case, since
> >> 'ehci_port_speed()' already has the same default return.
> >>
> >> Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
> >> ---
> >> drivers/usb/host/ehci.h | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
> >> index 0daed80..49b91b6 100644
> >> --- a/drivers/usb/host/ehci.h
> >> +++ b/drivers/usb/host/ehci.h
> >> @@ -664,8 +664,8 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int
> >> portsc)
> >> case 1:
> >> return USB_PORT_STAT_LOW_SPEED;
> >> case 2:
> >> + /* fall through to default function return */
> >
> >
> > We just don't need the above *case*.
> >
> >> default:
> >> - return USB_PORT_STAT_HIGH_SPEED;
> >
> >
> > And n ow we don't need *dafault* too.
>
> Case 1 only? If not low_speed, high_speed. So, I'll change it to a
> simple if branch.
No, please leave it as-is, it helps to understand what is going on here
easier.
thanks,
greg k-h
next prev parent reply other threads:[~2015-12-09 20:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 19:57 [PATCH 1/4] usb: host: ehci.h: cleanup header file Geyslan G. Bem
2015-12-09 19:57 ` [PATCH 2/4] " Geyslan G. Bem
2015-12-09 20:11 ` Sergei Shtylyov
2015-12-09 20:18 ` Geyslan G. Bem
2015-12-09 19:57 ` [PATCH 3/4] usb: host: ehci.h: remove duplicated return Geyslan G. Bem
2015-12-09 20:10 ` Sergei Shtylyov
2015-12-09 20:15 ` Geyslan G. Bem
2015-12-09 20:22 ` Greg Kroah-Hartman [this message]
2015-12-09 20:22 ` Sergei Shtylyov
2015-12-09 21:08 ` kbuild test robot
2015-12-09 21:24 ` kbuild test robot
2015-12-09 21:47 ` Geyslan G. Bem
2015-12-09 19:57 ` [PATCH 4/4] usb: host: ehci.h: use flexible array instead of zero-length array Geyslan G. Bem
2015-12-09 20:09 ` [PATCH 1/4] usb: host: ehci.h: cleanup header file Greg Kroah-Hartman
2015-12-09 21:00 ` Geyslan G. Bem
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=20151209202200.GA11593@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=geyslan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter.senna@gmail.com \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=stern@rowland.harvard.edu \
/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