Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751352AbbLIUWE (ORCPT ); Wed, 9 Dec 2015 15:22:04 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:43213 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750960AbbLIUWC (ORCPT ); Wed, 9 Dec 2015 15:22:02 -0500 Date: Wed, 9 Dec 2015 15:22:00 -0500 From: Greg Kroah-Hartman To: "Geyslan G. Bem" Cc: Sergei Shtylyov , Peter Senna Tschudin , Alan Stern , linux-usb@vger.kernel.org, LKML Subject: Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return Message-ID: <20151209202200.GA11593@kroah.com> References: <1449691056-32238-1-git-send-email-geyslan@gmail.com> <1449691056-32238-3-git-send-email-geyslan@gmail.com> <56688A9B.9080607@cogentembedded.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1599 Lines: 48 On Wed, Dec 09, 2015 at 05:15:43PM -0300, Geyslan G. Bem wrote: > 2015-12-09 17:10 GMT-03:00 Sergei Shtylyov : > > 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 > >> --- > >> 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/