From patchwork Tue Oct 25 15:09:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 79208 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp3171406qge; Tue, 25 Oct 2016 08:17:37 -0700 (PDT) X-Received: by 10.99.56.22 with SMTP id f22mr18829720pga.72.1477408657384; Tue, 25 Oct 2016 08:17:37 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u15si21162545pfa.246.2016.10.25.08.17.37; Tue, 25 Oct 2016 08:17:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-acpi-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-acpi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759152AbcJYPRM (ORCPT + 7 others); Tue, 25 Oct 2016 11:17:12 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:58482 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758994AbcJYPRJ (ORCPT ); Tue, 25 Oct 2016 11:17:09 -0400 Received: from 172.24.1.60 (EHLO szxeml431-hub.china.huawei.com) ([172.24.1.60]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DPO56761; Tue, 25 Oct 2016 23:15:23 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by szxeml431-hub.china.huawei.com (10.82.67.208) with Microsoft SMTP Server id 14.3.235.1; Tue, 25 Oct 2016 23:12:19 +0800 From: Hanjun Guo To: Marc Zyngier , "Rafael J. Wysocki" , Lorenzo Pieralisi CC: , , , Thomas Gleixner , Greg KH , Tomasz Nowicki , Ma Jun , Kefeng Wang , "Agustin Vega-Frias" , Sinan Kaya , "G Gregory" , Charles Garcia-Tobin , , , , Hanjun Guo Subject: [PATCH v3 08/14] ACPI: ARM64: IORT: rework iort_node_get_id() Date: Tue, 25 Oct 2016 23:09:23 +0800 Message-ID: <1477408169-22217-9-git-send-email-guohanjun@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1477408169-22217-1-git-send-email-guohanjun@huawei.com> References: <1477408169-22217-1-git-send-email-guohanjun@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Hanjun Guo iort_node_get_id() has two output, one is the mapped ids, the other is the referenced parent node which is returned from the function. For now we need a API just return its parent node for single mapping, so just update this function slightly then reuse it later. Signed-off-by: Hanjun Guo Cc: Lorenzo Pieralisi Cc: Marc Zyngier --- drivers/acpi/arm64/iort.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.7.12.4 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index 7d543aa..2881108 100644 --- a/drivers/acpi/arm64/iort.c +++ b/drivers/acpi/arm64/iort.c @@ -347,7 +347,8 @@ struct acpi_iort_node *iort_node_get_id(struct acpi_iort_node *node, if (map[index].flags & ACPI_IORT_ID_SINGLE_MAPPING) { if (node->type == ACPI_IORT_NODE_NAMED_COMPONENT || node->type == ACPI_IORT_NODE_PCI_ROOT_COMPLEX) { - *id_out = map[index].output_base; + if (id_out) + *id_out = map[index].output_base; return parent; } }