Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1287829

Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return
Date 2015-12-09 21:30 +0100
Message-ID <qDTx8-4FB-5@gated-at.bofh.it> (permalink)
References <qDT47-4g8-9@gated-at.bofh.it> <qDT47-4g8-31@gated-at.bofh.it> <qDTnt-4C7-39@gated-at.bofh.it> <qDTnu-4C7-45@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] usb: host: ehci.h: cleanup header file "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-09 21:00 +0100
  [PATCH 3/4] usb: host: ehci.h: remove duplicated return "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-09 21:00 +0100
    Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-12-09 21:20 +0100
      Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-09 21:20 +0100
        Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-09 21:30 +0100
        Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-12-09 21:30 +0100
    Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return kbuild test robot <lkp@intel.com> - 2015-12-09 22:10 +0100
    Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return kbuild test robot <lkp@intel.com> - 2015-12-09 22:30 +0100
      Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-09 22:50 +0100
  [PATCH 2/4] usb: host: ehci.h: cleanup header file "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-09 21:00 +0100
    Re: [PATCH 2/4] usb: host: ehci.h: cleanup header file "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-09 21:20 +0100
    Re: [PATCH 2/4] usb: host: ehci.h: cleanup header file Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-12-09 21:20 +0100
  [PATCH 4/4] usb: host: ehci.h: use flexible array instead of zero-length array "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-09 21:00 +0100
  Re: [PATCH 1/4] usb: host: ehci.h: cleanup header file Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-12-09 21:10 +0100
    Re: [PATCH 1/4] usb: host: ehci.h: cleanup header file "Geyslan G. Bem" <geyslan@gmail.com> - 2015-12-09 22:10 +0100

csiph-web