lkml.org 
[lkml]   [2015]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/4] usb: host: ehci.h: remove duplicated return
From
Date
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 <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.

There's *case* 0 yet.


>>
>>> }
>>> }
>>> return USB_PORT_STAT_HIGH_SPEED;

MBR, Sergei



\
 
 \ /
  Last update: 2015-12-09 21:41    [W:0.989 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site