From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Colin King <colin.king@canonical.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Nick Dyer <nick@shmanahar.org>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: synaptics-rmi4: check for non zero version logically dead code
Date: Mon, 2 Jan 2017 10:03:08 +0100 [thread overview]
Message-ID: <20170102090308.GB5767@mail.corp.redhat.com> (raw)
In-Reply-To: <20161220095649.7674-1-colin.king@canonical.com>
On Dec 20 2016 or thereabouts, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> version is a u8, the check for version > 0 means that version can only
> be zero, so the subsequent check for version != 0 is never true and
> hence is redudant code and can be removed.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
Works for me:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> drivers/input/rmi4/rmi_f34.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_f34.c b/drivers/input/rmi4/rmi_f34.c
> index 9774dfb..c3285ce 100644
> --- a/drivers/input/rmi4/rmi_f34.c
> +++ b/drivers/input/rmi4/rmi_f34.c
> @@ -441,8 +441,6 @@ static int rmi_f34_probe(struct rmi_function *fn)
> /* v5 code only supported version 0, try V7 probe */
> if (version > 0)
> return rmi_f34v7_probe(f34);
> - else if (version != 0)
> - return -ENODEV;
>
> f34->bl_version = 5;
>
> --
> 2.10.2
>
prev parent reply other threads:[~2017-01-02 9:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-20 9:56 Colin King
2017-01-02 9:03 ` Benjamin Tissoires [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=20170102090308.GB5767@mail.corp.redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=colin.king@canonical.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@shmanahar.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
all inboxes | Powered by JetHome®