Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1754498ybl; Sat, 31 Aug 2019 01:35:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqxI1hZ/T1UZKuqy9094tXFNO1vHiwppSnHX4g29+yKiDNEWNrC6PPbt+RnoyjGksjm78FJA X-Received: by 2002:a63:ee04:: with SMTP id e4mr16319140pgi.53.1567240504415; Sat, 31 Aug 2019 01:35:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567240504; cv=none; d=google.com; s=arc-20160816; b=CPc//hWIXA+5eyQmDe2msngtczzA7gKPQLEaVe9zFUz763l0HHk5MmLDbyUYX2ettD 1QicjzBNLKNQNcxggqodHmqEem2oh1cyudnyTot5WSFkGEfUTNToVEzdtVNPpze/v7A/ 1mcooT8LZ5+WQKrndagFgaWSEXJ14r1yXEaqCgH48YxXi0jd37lITkCJZj6kaQPQjVWj iM8AkOYKsRu2PP1h1xYIUBkvoDIO5Qj/ckAfIidKVDi8igRIOWG1HdawgUhlD6pbg9VR p0en+T8Gne1NyLKtZf5rfLHCv9f2T0OgM+5JkhE9a/vIwwLSNKrdhQ6XFGdxvO1VQSOy S3qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=CFy1mJSLIjDTSmgBZJ5itEEF4NQR3VVtbC1xGIT6iAQ=; b=cr3zFnIzb4kZzincaQshwMwOFOXnFny4eJS0agKyFg2vSXPZ/zaJvNPVm52/rMNNMm HwTGGIewoQaXCFuMtNX351TF7/bJeANI+kMakGaUg81taYnPMp0hdJ2KMFVs6gjm6Zex irv0hWUwI8vn3NLsO2GBVMwbO6W74ZF/N9VLOgrHYAQsQ7Pi+mt0jXq11hh84Z/njmU/ XdqB5/m8n9aQWRZEv+ijiM4gexL6LUhZUgnufgME+ioVT9V6HBWUY9A77bgOkq/72HBk zqGHfUhHeBHpyVWL0xS6/jgeRvi1rgfvnbh0SdszzWDWzThvGhtp7AdzYpj7K0kbKyi0 tXug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si6540259pgr.378.2019.08.31.01.34.48; Sat, 31 Aug 2019 01:35:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726679AbfHaIeA (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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