diff mbox

Input: cros_ec_keyb: remove redundant variable num_cols

Message ID 20180702162841.12553-1-colin.king@canonical.com (mailing list archive)
State Accepted
Headers show

Commit Message

Colin King July 2, 2018, 4:28 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Variable num_cols is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable ‘num_cols’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/input/keyboard/cros_ec_keyb.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Dmitry Torokhov July 4, 2018, 3:55 p.m. UTC | #1
On Mon, Jul 02, 2018 at 05:28:41PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable num_cols is being assigned but is never used hence it is
> redundant and can be removed.
> 
> Cleans up clang warning:
> warning: variable ‘num_cols’ set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied, thank you.

> ---
>  drivers/input/keyboard/cros_ec_keyb.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
> index 820bebad519a..81be6f781f0b 100644
> --- a/drivers/input/keyboard/cros_ec_keyb.c
> +++ b/drivers/input/keyboard/cros_ec_keyb.c
> @@ -160,9 +160,6 @@ static void cros_ec_keyb_process(struct cros_ec_keyb *ckdev,
>  	int col, row;
>  	int new_state;
>  	int old_state;
> -	int num_cols;
> -
> -	num_cols = len;
>  
>  	if (ckdev->ghost_filter && cros_ec_keyb_has_ghosting(ckdev, kb_state)) {
>  		/*
> -- 
> 2.17.1
>
diff mbox

Patch

diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c
index 820bebad519a..81be6f781f0b 100644
--- a/drivers/input/keyboard/cros_ec_keyb.c
+++ b/drivers/input/keyboard/cros_ec_keyb.c
@@ -160,9 +160,6 @@  static void cros_ec_keyb_process(struct cros_ec_keyb *ckdev,
 	int col, row;
 	int new_state;
 	int old_state;
-	int num_cols;
-
-	num_cols = len;
 
 	if (ckdev->ghost_filter && cros_ec_keyb_has_ghosting(ckdev, kb_state)) {
 		/*