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: <20190526161939.GA256861@dtor-ws>
Date:   Sun, 26 May 2019 09:19:39 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     YueHaibing <yuehaibing@...wei.com>
Cc:     cheiny@...aptics.com, nick@...anahar.org,
        linux-kernel@...r.kernel.org, linux-input@...r.kernel.org
Subject: Re: [PATCH -next] Input: synaptics-rmi4 - Remove set but not used
 variable 'sensor_flags'

On Sat, May 25, 2019 at 10:11:19PM +0800, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/input/rmi4/rmi_f12.c: In function rmi_f12_read_sensor_tuning:
> drivers/input/rmi4/rmi_f12.c:76:6: warning: variable sensor_flags set but not used [-Wunused-but-set-variable]
> 
> It's not used since introduction in
> commit b43d2c1e9353 ("Input: synaptics-rmi4 - add support for F12")
> 
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>

Applied, thank you.

> ---
>  drivers/input/rmi4/rmi_f12.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/input/rmi4/rmi_f12.c b/drivers/input/rmi4/rmi_f12.c
> index 5c7f48915779..72b5498e1a9f 100644
> --- a/drivers/input/rmi4/rmi_f12.c
> +++ b/drivers/input/rmi4/rmi_f12.c
> @@ -73,7 +73,6 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
>  	int pitch_y = 0;
>  	int rx_receivers = 0;
>  	int tx_receivers = 0;
> -	int sensor_flags = 0;
>  
>  	item = rmi_get_register_desc_item(&f12->control_reg_desc, 8);
>  	if (!item) {
> @@ -129,10 +128,8 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
>  		offset += 2;
>  	}
>  
> -	if (rmi_register_desc_has_subpacket(item, 4)) {
> -		sensor_flags = buf[offset];
> +	if (rmi_register_desc_has_subpacket(item, 4))
>  		offset += 1;
> -	}
>  
>  	sensor->x_mm = (pitch_x * rx_receivers) >> 12;
>  	sensor->y_mm = (pitch_y * tx_receivers) >> 12;
> -- 
> 2.17.1
> 
> 

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ