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] [day] [month] [year] [list]
Message-ID: <201908051318.0884AE3F@keescook>
Date:   Mon, 5 Aug 2019 13:18:56 -0700
From:   Kees Cook <keescook@...omium.org>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc:     Dominik Brodowski <linux@...inikbrodowski.net>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pcmcia: db1xxx_ss: Mark expected switch fall-throughs

On Mon, Aug 05, 2019 at 02:49:42PM -0500, Gustavo A. R. Silva wrote:
> Mark switch cases where we are expecting to fall through.
> 
> This patch fixes the following warnings (Building: db1xxx_defconfig mips):
> 
> drivers/pcmcia/db1xxx_ss.c:257:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
> drivers/pcmcia/db1xxx_ss.c:269:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>

Reviewed-by: Kees Cook <keescook@...omium.org>

-Kees

> ---
>  drivers/pcmcia/db1xxx_ss.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c
> index eb6168e6ac43..590e594092f2 100644
> --- a/drivers/pcmcia/db1xxx_ss.c
> +++ b/drivers/pcmcia/db1xxx_ss.c
> @@ -255,8 +255,10 @@ static int db1x_pcmcia_configure(struct pcmcia_socket *skt,
>  	switch (state->Vcc) {
>  	case 50:
>  		++v;
> +		/* fall through */
>  	case 33:
>  		++v;
> +		/* fall through */
>  	case 0:
>  		break;
>  	default:
> @@ -267,9 +269,11 @@ static int db1x_pcmcia_configure(struct pcmcia_socket *skt,
>  	switch (state->Vpp) {
>  	case 12:
>  		++p;
> +		/* fall through */
>  	case 33:
>  	case 50:
>  		++p;
> +		/* fall through */
>  	case 0:
>  		break;
>  	default:
> -- 
> 2.22.0
> 

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ