[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1567240295-44686-1-git-send-email-tiantao6@huawei.com>
Date: Sat, 31 Aug 2019 16:31:35 +0800
From: tiantao <tiantao6@...wei.com>
To: <rafael.j.wysocki@...el.com>, <guohanjun@...wei.com>,
<robert.moore@...el.com>, <erik.schmauss@...el.com>,
<lenb@...nel.org>
CC: <linuxarm@...wei.com>, <linux-acpi@...r.kernel.org>,
<devel@...ica.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] ACPICA: Namespace: fix the no brace needed warning
for if else statements having single block no braces are needed fixed
the following checkpatch warning
WARNING: braces {} are not necessary for any arm of this statement
+ if (!prev_node) {
[...]
+ } else {
[...]
Signed-off-by: tiantao <tiantao6@...wei.com>
---
drivers/acpi/acpica/nsaccess.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/acpi/acpica/nsaccess.c b/drivers/acpi/acpica/nsaccess.c
index 2566e2d..7cef22a 100644
--- a/drivers/acpi/acpica/nsaccess.c
+++ b/drivers/acpi/acpica/nsaccess.c
@@ -109,11 +109,10 @@ acpi_status acpi_ns_root_initialize(void)
new_node->descriptor_type = ACPI_DESC_TYPE_NAMED;
new_node->type = init_val->type;
- if (!prev_node) {
+ if (!prev_node)
acpi_gbl_root_node_struct.child = new_node;
- } else {
+ else
prev_node->peer = new_node;
- }
new_node->parent = &acpi_gbl_root_node_struct;
prev_node = new_node;
--
2.7.4
Powered by blists - more mailing lists