* [PATCH] Input: synaptics-rmi4 - Fix reversed tests
@ 2017-01-27 12:11 ` Christophe JAILLET
0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2017-01-27 12:11 UTC (permalink / raw)
To: dmitry.torokhov, benjamin.tissoires, aduggan, nick, yamada.masahiro
Cc: linux-input, linux-kernel, kernel-janitors, Christophe JAILLET
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>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] Input: synaptics-rmi4 - Fix reversed tests
@ 2017-01-27 12:11 ` Christophe JAILLET
0 siblings, 0 replies; 6+ messages in thread
From: Christophe JAILLET @ 2017-01-27 12:11 UTC (permalink / raw)
To: dmitry.torokhov, benjamin.tissoires, aduggan, nick, yamada.masahiro
Cc: linux-input, linux-kernel, kernel-janitors, Christophe JAILLET
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>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Input: synaptics-rmi4 - Fix reversed tests
2017-01-27 12:11 ` Christophe JAILLET
@ 2017-01-27 17:18 ` Benjamin Tissoires
-1 siblings, 0 replies; 6+ messages in thread
From: Benjamin Tissoires @ 2017-01-27 17:18 UTC (permalink / raw)
To: Christophe JAILLET
Cc: dmitry.torokhov, aduggan, nick, yamada.masahiro, linux-input,
linux-kernel, kernel-janitors
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Input: synaptics-rmi4 - Fix reversed tests
@ 2017-01-27 17:18 ` Benjamin Tissoires
0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Tissoires @ 2017-01-27 17:18 UTC (permalink / raw)
To: Christophe JAILLET
Cc: dmitry.torokhov, aduggan, nick, yamada.masahiro, linux-input,
linux-kernel, kernel-janitors
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Input: synaptics-rmi4 - Fix reversed tests
2017-01-27 17:18 ` Benjamin Tissoires
@ 2017-01-31 8:51 ` Dmitry Torokhov
-1 siblings, 0 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2017-01-31 8:51 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Christophe JAILLET, aduggan, nick, yamada.masahiro, linux-input,
linux-kernel, kernel-janitors
On Fri, Jan 27, 2017 at 06:18:27PM +0100, Benjamin Tissoires wrote:
> 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>
Applied, thank you.
>
> 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
> >
--
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Input: synaptics-rmi4 - Fix reversed tests
@ 2017-01-31 8:51 ` Dmitry Torokhov
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2017-01-31 8:51 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Christophe JAILLET, aduggan, nick, yamada.masahiro, linux-input,
linux-kernel, kernel-janitors
On Fri, Jan 27, 2017 at 06:18:27PM +0100, Benjamin Tissoires wrote:
> 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>
Applied, thank you.
>
> 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
> >
--
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-31 8:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-27 12:11 [PATCH] Input: synaptics-rmi4 - Fix reversed tests Christophe JAILLET
2017-01-27 12:11 ` Christophe JAILLET
2017-01-27 17:18 ` Benjamin Tissoires
2017-01-27 17:18 ` Benjamin Tissoires
2017-01-31 8:51 ` Dmitry Torokhov
2017-01-31 8:51 ` Dmitry Torokhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.