From patchwork Mon Jan 2 13:31:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 89500 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp7592869qgi; Mon, 2 Jan 2017 05:34:11 -0800 (PST) X-Received: by 10.84.164.162 with SMTP id w31mr126282122pla.9.1483364051535; Mon, 02 Jan 2017 05:34:11 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4si33962076pfl.94.2017.01.02.05.34.10; Mon, 02 Jan 2017 05:34:11 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org; 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; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933118AbdABNdn (ORCPT + 7 others); Mon, 2 Jan 2017 08:33:43 -0500 Received: from mail-pf0-f179.google.com ([209.85.192.179]:36213 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933059AbdABNdk (ORCPT ); Mon, 2 Jan 2017 08:33:40 -0500 Received: by mail-pf0-f179.google.com with SMTP id 189so73235868pfz.3 for ; Mon, 02 Jan 2017 05:33:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LvnBvg8Qk9UV5iauDb5QuMvhif4+rsYAarZ3sEiurzY=; b=cOH0zbJv4VqUcHV2iTb3TW9Z8aZkq1CCzSMHT9B/iIjf+P40SoOQ9YIEjraZR2TGQt G5J+TlYqq48rYkkoLTlDrYKQRg4mywp60NE0W7SbyNMU1OZmCCvlMKmtuvrkZynK7T0u dXytvfFWCWgVpkB/S6u2+szFpva/FdIEmDcjc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LvnBvg8Qk9UV5iauDb5QuMvhif4+rsYAarZ3sEiurzY=; b=M5uFt4NWXaIOm6gSg9+8MyF1qDoh9DdAw0peDYUtVE8AGLNh4c+uV4K12k28UZIDAg 5kgOMdNk7DWmdDzPKEX0AtNycDpU48hR0oJB/gKElA3T8ZfBr8KOG2RMTX7fhhsQS/fW dPjsWN8UplgAXstuNlo5wIQaBQtJabJ+P6evAfdEjsM8mG54Gmp0FsimDXA5FDH9yLoS u18e3g29DlSsBF1E9fvDWTB+TCF+t1JJYygNGb1Y3Ccxx+boDquFmmd5lCPuJKXnk/ut rwNN0RcLlKZK6JQSaNRMF71WkVPhth7HVbOZVGYf0MY8NCvrT5KiQqIVekHedjwSeqFW av0w== X-Gm-Message-State: AIkVDXIosuzX/LHicFaN9OrM9wd8FKMXso4xhO47dsKgnEfb0BOZ3qX91KpBtyLqzE+gp4FH X-Received: by 10.99.129.67 with SMTP id t64mr105872788pgd.4.1483364019809; Mon, 02 Jan 2017 05:33:39 -0800 (PST) Received: from localhost ([104.237.91.251]) by smtp.googlemail.com with ESMTPSA id w24sm132606069pfa.9.2017.01.02.05.33.38 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 02 Jan 2017 05:33:39 -0800 (PST) From: Hanjun Guo To: Marc Zyngier , "Rafael J. Wysocki" , Lorenzo Pieralisi Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, Thomas Gleixner , Greg KH , Tomasz Nowicki , Ma Jun , Kefeng Wang , Agustin Vega-Frias , Sinan Kaya , charles.garcia-tobin@arm.com, huxinwei@huawei.com, yimin@huawei.com, Jon Masters , Hanjun Guo Subject: [PATCH v6 08/14] ACPI: ARM64: IORT: rework iort_node_get_id() Date: Mon, 2 Jan 2017 21:31:39 +0800 Message-Id: <1483363905-2806-9-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483363905-2806-1-git-send-email-hanjun.guo@linaro.org> References: <1483363905-2806-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.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 Tested-by: Majun Tested-by: Xinwei Kong Cc: Lorenzo Pieralisi Cc: Marc Zyngier --- drivers/acpi/arm64/iort.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 -- 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 ab7bae7..bc68d93 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; } }