Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1532293 > unrolled thread

[PATCH v4 08/11] ACPI: ARM64: IORT: rework iort_node_get_id()

Started byHanjun Guo <guohanjun@huawei.com>
First post2016-11-29 14:50 +0100
Last post2016-11-29 14:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v4 08/11] ACPI: ARM64: IORT: rework iort_node_get_id() Hanjun Guo <guohanjun@huawei.com> - 2016-11-29 14:50 +0100

#1532293 — [PATCH v4 08/11] ACPI: ARM64: IORT: rework iort_node_get_id()

FromHanjun Guo <guohanjun@huawei.com>
Date2016-11-29 14:50 +0100
Subject[PATCH v4 08/11] ACPI: ARM64: IORT: rework iort_node_get_id()
Message-ID<sIQXg-F4-41@gated-at.bofh.it>
From: Hanjun Guo <hanjun.guo@linaro.org>

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 <hanjun.guo@linaro.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
---
 drivers/acpi/arm64/iort.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 7b78282a..788f445 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;
 		}
 	}
-- 
1.7.12.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web