From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04C9FC3A59F for ; Sat, 31 Aug 2019 08:34:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE9812377D for ; Sat, 31 Aug 2019 08:34:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726402AbfHaIeA (ORCPT ); Sat, 31 Aug 2019 04:34:00 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5261 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726360AbfHaIeA (ORCPT ); Sat, 31 Aug 2019 04:34:00 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E49CB9A8C018A4B8E46B; Sat, 31 Aug 2019 16:33:56 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Sat, 31 Aug 2019 16:33:48 +0800 From: tiantao To: , , , , CC: , , , Subject: [PATCH] ACPICA: Namespace: fix the no brace needed warning Date: Sat, 31 Aug 2019 16:31:35 +0800 Message-ID: <1567240295-44686-1-git-send-email-tiantao6@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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 --- 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