From: tiantao <tiantao6@huawei.com>
To: <rafael.j.wysocki@intel.com>, <guohanjun@huawei.com>,
<robert.moore@intel.com>, <erik.schmauss@intel.com>,
<lenb@kernel.org>
Cc: <linuxarm@huawei.com>, <linux-acpi@vger.kernel.org>,
<devel@acpica.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] ACPICA: Namespace: fix the no brace needed warning
Date: Sat, 31 Aug 2019 16:31:35 +0800 [thread overview]
Message-ID: <1567240295-44686-1-git-send-email-tiantao6@huawei.com> (raw)
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@huawei.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
next reply other threads:[~2019-08-31 8:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-31 8:31 tiantao [this message]
2019-09-02 21:32 ` [PATCH] ACPICA: Namespace: fix the no brace needed warning Rafael J. Wysocki
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=1567240295-44686-1-git-send-email-tiantao6@huawei.com \
--to=tiantao6@huawei.com \
--cc=devel@acpica.org \
--cc=erik.schmauss@intel.com \
--cc=guohanjun@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=rafael.j.wysocki@intel.com \
--cc=robert.moore@intel.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).