From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: dmitry.torokhov@gmail.com, aduggan@synaptics.com,
nick@shmanahar.org, yamada.masahiro@socionext.com,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] Input: synaptics-rmi4 - Fix reversed tests
Date: Fri, 27 Jan 2017 18:18:27 +0100 [thread overview]
Message-ID: <20170127171827.GE13244@mail.corp.redhat.com> (raw)
In-Reply-To: <20170127121115.19427-1-christophe.jaillet@wanadoo.fr>
On Jan 27 2017 or thereabouts, Christophe JAILLET wrote:
> These tests looks reversed.
> A warning should be displayed if an error is returned, not on success.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
Good catch!
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cheers,
Benjamin
> drivers/input/rmi4/rmi_driver.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
> index 11447ab1055c..bf5c36e229ba 100644
> --- a/drivers/input/rmi4/rmi_driver.c
> +++ b/drivers/input/rmi4/rmi_driver.c
> @@ -901,7 +901,7 @@ void rmi_enable_irq(struct rmi_device *rmi_dev, bool clear_wake)
> data->enabled = true;
> if (clear_wake && device_may_wakeup(rmi_dev->xport->dev)) {
> retval = disable_irq_wake(irq);
> - if (!retval)
> + if (retval)
> dev_warn(&rmi_dev->dev,
> "Failed to disable irq for wake: %d\n",
> retval);
> @@ -936,7 +936,7 @@ void rmi_disable_irq(struct rmi_device *rmi_dev, bool enable_wake)
> disable_irq(irq);
> if (enable_wake && device_may_wakeup(rmi_dev->xport->dev)) {
> retval = enable_irq_wake(irq);
> - if (!retval)
> + if (retval)
> dev_warn(&rmi_dev->dev,
> "Failed to enable irq for wake: %d\n",
> retval);
> --
> 2.9.3
>
next prev parent reply other threads:[~2017-01-27 17:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-27 12:11 [PATCH] Input: synaptics-rmi4 - Fix reversed tests Christophe JAILLET
2017-01-27 17:18 ` Benjamin Tissoires [this message]
2017-01-31 8:51 ` Dmitry Torokhov
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=20170127171827.GE13244@mail.corp.redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=aduggan@synaptics.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dmitry.torokhov@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@shmanahar.org \
--cc=yamada.masahiro@socionext.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).