2021-07-03 09:17:58

by Gu Shengxian

[permalink] [raw]
Subject: [PATCH] ACPICA: fix if condition

From: gushengxian <[email protected]>

Fix if condition.

Signed-off-by: gushengxian <[email protected]>
---
drivers/acpi/acpica/dswexec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c
index 41ba7773fd10..c4cd61469e1f 100644
--- a/drivers/acpi/acpica/dswexec.c
+++ b/drivers/acpi/acpica/dswexec.c
@@ -561,8 +561,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
op->common.
node->object,
NULL);
- if ACPI_FAILURE
- (status) {
+ if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status,
"While writing to buffer field"));
}
--
2.25.1


2021-07-03 09:44:05

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] ACPICA: fix if condition

On Sat, 2021-07-03 at 02:12 -0700, gushengxian wrote:
> From: gushengxian <[email protected]>
>
> Fix if condition.

A few more of these...

drivers/platform/x86/thinkpad_acpi.c: if ACPI_FAILURE(tpacpi_battery_acpi_eval(GET_START, ret, battery))
drivers/platform/x86/thinkpad_acpi.c: if ACPI_FAILURE(tpacpi_battery_acpi_eval(GET_STOP, ret, battery))
drivers/platform/x86/thinkpad_acpi.c: if ACPI_FAILURE(tpacpi_battery_acpi_eval(SET_START, &ret, param)) {
drivers/platform/x86/thinkpad_acpi.c: if ACPI_FAILURE(tpacpi_battery_acpi_eval(SET_STOP, &ret, param)) {
drivers/platform/x86/thinkpad_acpi.c: if ACPI_FAILURE(tpacpi_battery_acpi_eval(GET_START, &ret, battery)) {
drivers/platform/x86/thinkpad_acpi.c: if ACPI_FAILURE(tpacpi_battery_acpi_eval(GET_STOP, &ret, battery)) {


2021-07-09 14:42:17

by Moore, Robert

[permalink] [raw]
Subject: RE: [PATCH] ACPICA: fix if condition

Got it,
Thanks.


-----Original Message-----
From: gushengxian <[email protected]>
Sent: Saturday, July 03, 2021 2:12 AM
To: Moore, Robert <[email protected]>; [email protected]; Wysocki, Rafael J <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; gushengxian <[email protected]>
Subject: [PATCH] ACPICA: fix if condition

From: gushengxian <[email protected]>

Fix if condition.

Signed-off-by: gushengxian <[email protected]>
---
drivers/acpi/acpica/dswexec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/acpi/acpica/dswexec.c b/drivers/acpi/acpica/dswexec.c index 41ba7773fd10..c4cd61469e1f 100644
--- a/drivers/acpi/acpica/dswexec.c
+++ b/drivers/acpi/acpica/dswexec.c
@@ -561,8 +561,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
op->common.
node->object,
NULL);
- if ACPI_FAILURE
- (status) {
+ if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, status,
"While writing to buffer field"));
}
--
2.25.1