Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1436933 > unrolled thread
| Started by | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| First post | 2016-07-05 13:20 +0200 |
| Last post | 2016-07-06 04:10 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/5] ACPI / debugger: Fix regressions that AML debugger stops working Lv Zheng <lv.zheng@intel.com> - 2016-07-05 13:20 +0200
Re: [PATCH 2/5] ACPI / debugger: Fix regressions that AML debugger stops working "Rafael J. Wysocki" <rafael@kernel.org> - 2016-07-06 01:50 +0200
RE: [PATCH 2/5] ACPI / debugger: Fix regressions that AML debugger stops working "Zheng, Lv" <lv.zheng@intel.com> - 2016-07-06 04:10 +0200
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2016-07-05 13:20 +0200 |
| Subject | [PATCH 2/5] ACPI / debugger: Fix regressions that AML debugger stops working |
| Message-ID | <rRwyt-24B-17@gated-at.bofh.it> |
The FIFO unlocking mechanism in acpi_dbg has been messed up by the
following commit:
Commit: 287980e49ffc0f6d911601e7e352a812ed27768e
Subject: remove lots of IS_ERR_VALUE abuses
It converts !IS_ERR_VALUE(ret) into !ret. This patch fixes the
regression.
Fixes: 287980e49ffc ("remove lots of IS_ERR_VALUE abuses")
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
---
drivers/acpi/acpi_dbg.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpi_dbg.c b/drivers/acpi/acpi_dbg.c
index 1f41284..ebc8d18 100644
--- a/drivers/acpi/acpi_dbg.c
+++ b/drivers/acpi/acpi_dbg.c
@@ -602,7 +602,8 @@ static int acpi_aml_read_user(char __user *buf, int len)
crc->tail = (crc->tail + n) & (ACPI_AML_BUF_SIZE - 1);
ret = n;
out:
- acpi_aml_unlock_fifo(ACPI_AML_OUT_USER, !ret);
+ acpi_aml_unlock_fifo(ACPI_AML_OUT_USER,
+ ret < 0 ? false : true);
return ret;
}
@@ -672,7 +673,8 @@ static int acpi_aml_write_user(const char __user *buf, int len)
crc->head = (crc->head + n) & (ACPI_AML_BUF_SIZE - 1);
ret = n;
out:
- acpi_aml_unlock_fifo(ACPI_AML_IN_USER, !ret);
+ acpi_aml_unlock_fifo(ACPI_AML_IN_USER,
+ ret < 0 ? false : true);
return n;
}
--
1.7.10
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Date | 2016-07-06 01:50 +0200 |
| Subject | Re: [PATCH 2/5] ACPI / debugger: Fix regressions that AML debugger stops working |
| Message-ID | <rRIgh-1ju-7@gated-at.bofh.it> |
| In reply to | #1436933 |
On Tue, Jul 5, 2016 at 1:18 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> The FIFO unlocking mechanism in acpi_dbg has been messed up by the
> following commit:
> Commit: 287980e49ffc0f6d911601e7e352a812ed27768e
> Subject: remove lots of IS_ERR_VALUE abuses
> It converts !IS_ERR_VALUE(ret) into !ret. This patch fixes the
> regression.
>
> Fixes: 287980e49ffc ("remove lots of IS_ERR_VALUE abuses")
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
OK, but ->
> ---
> drivers/acpi/acpi_dbg.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/acpi_dbg.c b/drivers/acpi/acpi_dbg.c
> index 1f41284..ebc8d18 100644
> --- a/drivers/acpi/acpi_dbg.c
> +++ b/drivers/acpi/acpi_dbg.c
> @@ -602,7 +602,8 @@ static int acpi_aml_read_user(char __user *buf, int len)
> crc->tail = (crc->tail + n) & (ACPI_AML_BUF_SIZE - 1);
> ret = n;
> out:
> - acpi_aml_unlock_fifo(ACPI_AML_OUT_USER, !ret);
> + acpi_aml_unlock_fifo(ACPI_AML_OUT_USER,
> + ret < 0 ? false : true);
-> The ternary operation is not necessary here, because the result of
(ret < 0) is already boolean. So this can be written as
acpi_aml_unlock_fifo(ACPI_AML_OUT_USER, ret >= 0);
and analogously below.
I've made that change, please check the result in bleeding-edge.
Thanks,
Rafael
[toc] | [prev] | [next] | [standalone]
| From | "Zheng, Lv" <lv.zheng@intel.com> |
|---|---|
| Date | 2016-07-06 04:10 +0200 |
| Subject | RE: [PATCH 2/5] ACPI / debugger: Fix regressions that AML debugger stops working |
| Message-ID | <rRKrL-2YQ-5@gated-at.bofh.it> |
| In reply to | #1437334 |
Hi, Rafael
> From: rjwysocki@gmail.com [mailto:rjwysocki@gmail.com] On Behalf Of
> Rafael J. Wysocki
> Subject: Re: [PATCH 2/5] ACPI / debugger: Fix regressions that AML
> debugger stops working
>
> On Tue, Jul 5, 2016 at 1:18 PM, Lv Zheng <lv.zheng@intel.com> wrote:
> > The FIFO unlocking mechanism in acpi_dbg has been messed up by the
> > following commit:
> > Commit: 287980e49ffc0f6d911601e7e352a812ed27768e
> > Subject: remove lots of IS_ERR_VALUE abuses
> > It converts !IS_ERR_VALUE(ret) into !ret. This patch fixes the
> > regression.
> >
> > Fixes: 287980e49ffc ("remove lots of IS_ERR_VALUE abuses")
> > Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> > Cc: Arnd Bergmann <arnd@arndb.de>
>
> OK, but ->
>
> > ---
> > drivers/acpi/acpi_dbg.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/acpi/acpi_dbg.c b/drivers/acpi/acpi_dbg.c
> > index 1f41284..ebc8d18 100644
> > --- a/drivers/acpi/acpi_dbg.c
> > +++ b/drivers/acpi/acpi_dbg.c
> > @@ -602,7 +602,8 @@ static int acpi_aml_read_user(char __user *buf,
> int len)
> > crc->tail = (crc->tail + n) & (ACPI_AML_BUF_SIZE - 1);
> > ret = n;
> > out:
> > - acpi_aml_unlock_fifo(ACPI_AML_OUT_USER, !ret);
> > + acpi_aml_unlock_fifo(ACPI_AML_OUT_USER,
> > + ret < 0 ? false : true);
>
> -> The ternary operation is not necessary here, because the result of
> (ret < 0) is already boolean. So this can be written as
>
> acpi_aml_unlock_fifo(ACPI_AML_OUT_USER, ret >= 0);
>
> and analogously below.
>
> I've made that change, please check the result in bleeding-edge.
[Lv Zheng]
Confirmed to be working.
Thanks for the simplification.
Thanks and best regards
-Lv
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web