linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: cheiny@synaptics.com, nick@shmanahar.org,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH -next] Input: synaptics-rmi4 - Remove set but not used variable 'sensor_flags'
Date: Sun, 26 May 2019 09:19:39 -0700	[thread overview]
Message-ID: <20190526161939.GA256861@dtor-ws> (raw)
In-Reply-To: <20190525141119.11852-1-yuehaibing@huawei.com>

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

      reply	other threads:[~2019-05-26 16:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-25 14:11 [PATCH -next] Input: synaptics-rmi4 - Remove set but not used variable 'sensor_flags' YueHaibing
2019-05-26 16:19 ` Dmitry Torokhov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190526161939.GA256861@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=cheiny@synaptics.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick@shmanahar.org \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).