lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56688A9B.9080607@cogentembedded.com>
Date:	Wed, 9 Dec 2015 23:10:03 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	"Geyslan G. Bem" <geyslan@...il.com>, peter.senna@...il.com
Cc:	Alan Stern <stern@...land.harvard.edu>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] usb: host: ehci.h: remove duplicated return

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@...il.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.

>   		}
>   	}
>   	return USB_PORT_STAT_HIGH_SPEED;

MBR, Sergei

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ