From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Lv Zheng <lv.zheng@intel.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>, Lv Zheng <zetalog@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 2/5] ACPI / debugger: Fix regressions that AML debugger stops working
Date: Wed, 6 Jul 2016 01:41:50 +0200 [thread overview]
Message-ID: <CAJZ5v0gjN_bKyf+mph3qzRXMm0K+YOFDuucYa3rxoup99mYAQg@mail.gmail.com> (raw)
In-Reply-To: <c42921c3de9a94fcff97a2de7ac5599cc38ec41f.1467717305.git.lv.zheng@intel.com>
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
next prev parent reply other threads:[~2016-07-05 23:41 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-05 11:17 [PATCH 0/5] ACPI: ACPI documentations and trivial fixes Lv Zheng
2016-07-05 11:17 ` [PATCH 1/5] ACPI: Add documentation describing ACPICA release automation Lv Zheng
2016-07-05 11:18 ` [PATCH 2/5] ACPI / debugger: Fix regressions that AML debugger stops working Lv Zheng
2016-07-05 23:41 ` Rafael J. Wysocki [this message]
2016-07-06 2:08 ` Zheng, Lv
2016-07-05 11:18 ` [PATCH 3/5] ACPI / debugger: Add AML debugger documentation Lv Zheng
2016-07-05 11:18 ` [PATCH 4/5] ACPI / button: Add SW_ACPI_LID for new usage model Lv Zheng
2016-07-05 11:18 ` [PATCH 5/5] ACPI: Add configuration item to configure ACPICA error logs out Lv Zheng
2016-07-05 23:43 ` Rafael J. Wysocki
2016-07-06 1:46 ` Zheng, Lv
2016-07-07 7:10 ` [PATCH v2 0/4] ACPI: ACPI documentation Lv Zheng
2016-07-07 7:10 ` [PATCH v2 1/4] ACPI: Add documentation describing ACPICA release automation Lv Zheng
2016-07-07 7:10 ` [PATCH v2 2/4] ACPI / debugger: Add AML debugger documentation Lv Zheng
2016-07-07 7:10 ` [PATCH v2 3/4] ACPI / button: Add SW_ACPI_LID for new usage model Lv Zheng
2016-07-08 9:27 ` Benjamin Tissoires
2016-07-08 17:55 ` Dmitry Torokhov
2016-07-07 7:11 ` [PATCH v2 4/4] ACPI / button: Add document for ACPI control method lid device restrictions Lv Zheng
2016-07-08 9:17 ` Benjamin Tissoires
2016-07-08 17:51 ` Dmitry Torokhov
2016-07-11 11:34 ` Benjamin Tissoires
2016-07-12 0:41 ` Dmitry Torokhov
2016-07-12 7:43 ` Zheng, Lv
2016-07-20 3:21 ` Zheng, Lv
2016-07-12 7:13 ` Zheng, Lv
2016-07-19 7:17 ` Zheng, Lv
2016-07-19 8:40 ` Benjamin Tissoires
2016-07-19 8:57 ` Zheng, Lv
2016-07-19 9:07 ` Benjamin Tissoires
2016-07-11 3:20 ` Zheng, Lv
2016-07-11 10:58 ` Bastien Nocera
2016-07-12 7:06 ` Zheng, Lv
2016-07-11 11:42 ` Benjamin Tissoires
2016-07-11 11:47 ` Benjamin Tissoires
2016-07-12 7:34 ` Zheng, Lv
2016-07-12 10:17 ` [PATCH v3 1/2] ACPI / button: Add KEY_LID_CLOSE for new usage model Lv Zheng
2016-07-18 7:53 ` Benjamin Tissoires
2016-07-18 15:51 ` Bastien Nocera
2016-07-19 4:48 ` Zheng, Lv
2016-07-12 10:17 ` [PATCH v3 2/2] ACPI / button: Add document for ACPI control method lid device restrictions Lv Zheng
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=CAJZ5v0gjN_bKyf+mph3qzRXMm0K+YOFDuucYa3rxoup99mYAQg@mail.gmail.com \
--to=rafael@kernel.org \
--cc=arnd@arndb.de \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lv.zheng@intel.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--cc=zetalog@gmail.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).