Linux Input/HID development
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Colin King <colin.king@canonical.com>
Cc: Lee Jones <lee.jones@linaro.org>,
	linux-input@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: mxs-lradc: remove redundant assignment to pointer input
Date: Fri, 27 Oct 2017 15:48:10 -0700	[thread overview]
Message-ID: <20171027224810.qd7pjnmhjlnqblkk@dtor-ws> (raw)
In-Reply-To: <20171027155230.12887-1-colin.king@canonical.com>

On Fri, Oct 27, 2017 at 04:52:30PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The pointer 'input' is being initialized with ts->ts_input and this
> value is not being read as it is updated a few lines later with the
> return value from the call to devm_input_allocate_device. Remove the
> redundant initialization assignment.  Cleans up clang warning:
> 
> drivers/input/touchscreen/mxs-lradc-ts.c:587:20: warning: Value Xi
> stored to 'input' during its initialization is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied, thank you.

> ---
>  drivers/input/touchscreen/mxs-lradc-ts.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/touchscreen/mxs-lradc-ts.c b/drivers/input/touchscreen/mxs-lradc-ts.c
> index 3707e927f770..c850b517854e 100644
> --- a/drivers/input/touchscreen/mxs-lradc-ts.c
> +++ b/drivers/input/touchscreen/mxs-lradc-ts.c
> @@ -584,7 +584,7 @@ static void mxs_lradc_ts_hw_init(struct mxs_lradc_ts *ts)
>  
>  static int mxs_lradc_ts_register(struct mxs_lradc_ts *ts)
>  {
> -	struct input_dev *input = ts->ts_input;
> +	struct input_dev *input;
>  	struct device *dev = ts->dev;
>  
>  	input = devm_input_allocate_device(dev);
> -- 
> 2.14.1
> 

-- 
Dmitry

      reply	other threads:[~2017-10-27 22:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-27 15:52 [PATCH] input: mxs-lradc: remove redundant assignment to pointer input Colin King
2017-10-27 22:48 ` 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=20171027224810.qd7pjnmhjlnqblkk@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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