From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
<linux-kernel@vger.kernel.org>,
linux-acpi@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 2/5] ACPI / debugger: Fix regressions that AML debugger stops working
Date: Tue, 5 Jul 2016 19:18:07 +0800 [thread overview]
Message-ID: <c42921c3de9a94fcff97a2de7ac5599cc38ec41f.1467717305.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1467717304.git.lv.zheng@intel.com>
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
next prev parent reply other threads:[~2016-07-05 11:18 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 ` Lv Zheng [this message]
2016-07-05 23:41 ` [PATCH 2/5] ACPI / debugger: Fix regressions that AML debugger stops working Rafael J. Wysocki
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=c42921c3de9a94fcff97a2de7ac5599cc38ec41f.1467717305.git.lv.zheng@intel.com \
--to=lv.zheng@intel.com \
--cc=arnd@arndb.de \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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).