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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171110182420.w2eelj6p3z5u5nuc@dtor-ws>
Date:   Fri, 10 Nov 2017 10:24:20 -0800
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     "Gustavo A. R. Silva" <garsilva@...eddedor.com>
Cc:     linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: spaceball - mark expected switch fall-throughs

On Wed, Nov 08, 2017 at 08:55:59PM -0600, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Addresses-Coverity-ID: 114767
> Addresses-Coverity-ID: 114768
> Addresses-Coverity-ID: 114769
> Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>

Applied, thank you.

> ---
>  drivers/input/joystick/spaceball.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c
> index e9712a1..bb3faef 100644
> --- a/drivers/input/joystick/spaceball.c
> +++ b/drivers/input/joystick/spaceball.c
> @@ -162,6 +162,7 @@ static irqreturn_t spaceball_interrupt(struct serio *serio,
>  				break;
>  			}
>  			spaceball->escape = 0;
> +			/* fall through */
>  		case 'M':
>  		case 'Q':
>  		case 'S':
> @@ -169,6 +170,7 @@ static irqreturn_t spaceball_interrupt(struct serio *serio,
>  				spaceball->escape = 0;
>  				data &= 0x1f;
>  			}
> +			/* fall through */
>  		default:
>  			if (spaceball->escape)
>  				spaceball->escape = 0;
> @@ -234,11 +236,13 @@ static int spaceball_connect(struct serio *serio, struct serio_driver *drv)
>  			input_dev->keybit[BIT_WORD(BTN_A)] |= BIT_MASK(BTN_A) |
>  				BIT_MASK(BTN_B) | BIT_MASK(BTN_C) |
>  				BIT_MASK(BTN_MODE);
> +			/* fall through */
>  		default:
>  			input_dev->keybit[BIT_WORD(BTN_0)] |= BIT_MASK(BTN_2) |
>  				BIT_MASK(BTN_3) | BIT_MASK(BTN_4) |
>  				BIT_MASK(BTN_5) | BIT_MASK(BTN_6) |
>  				BIT_MASK(BTN_7) | BIT_MASK(BTN_8);
> +			/* fall through */
>  		case SPACEBALL_3003C:
>  			input_dev->keybit[BIT_WORD(BTN_0)] |= BIT_MASK(BTN_1) |
>  				BIT_MASK(BTN_8);
> -- 
> 2.7.4
> 

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ