From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751863AbbLIUWn (ORCPT ); Wed, 9 Dec 2015 15:22:43 -0500 Received: from mail-lb0-f178.google.com ([209.85.217.178]:35060 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750933AbbLIUWl (ORCPT ); Wed, 9 Dec 2015 15:22:41 -0500 Subject: Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return To: "Geyslan G. Bem" References: <1449691056-32238-1-git-send-email-geyslan@gmail.com> <1449691056-32238-3-git-send-email-geyslan@gmail.com> <56688A9B.9080607@cogentembedded.com> Cc: Peter Senna Tschudin , Alan Stern , Greg Kroah-Hartman , linux-usb@vger.kernel.org, LKML From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: <56688D8E.60005@cogentembedded.com> Date: Wed, 9 Dec 2015 23:22:38 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/09/2015 11:15 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. There's *case* 0 yet. >> >>> } >>> } >>> return USB_PORT_STAT_HIGH_SPEED; MBR, Sergei