From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937160AbdAESi1 (ORCPT ); Thu, 5 Jan 2017 13:38:27 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:38062 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751035AbdAEShl (ORCPT ); Thu, 5 Jan 2017 13:37:41 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org C8ACD6041C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH] ACPI/IORT: Fix iort_node_get_id() mapping entries indexing To: Lorenzo Pieralisi , linux-acpi@vger.kernel.org References: <20170105182921.8167-1-lorenzo.pieralisi@arm.com> Cc: linux-kernel@vger.kernel.org, Hanjun Guo , Tomasz Nowicki , Nate Watterson , "Rafael J. Wysocki" From: Sinan Kaya Message-ID: <8f8816bf-1a29-ca28-79f3-7bc1b9e9fb5c@codeaurora.org> Date: Thu, 5 Jan 2017 13:37:22 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170105182921.8167-1-lorenzo.pieralisi@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/5/2017 1:29 PM, Lorenzo Pieralisi wrote: > iort_node_get_id() takes an index as input to refer to a specific > mapping entry in the mapping array to retrieve the id at a specific > index provided the index is below the total mapping count; currently the > index is used to retrieve the mapping value from the correct entry but > not to dereference the correct entry while retrieving the mapping > output_reference (ie IORT parent pointer), which consequently always > resolves to the output_reference of the first entry in the mapping > array. Maybe, irrelevant but I'm going to throw it out. Can we somehow break these multiple input and multiple output single function into smaller and manageable pieces while we are fixing a bug on it? These functions seem to do N different things when an input is present or not. I got lost in these function when implementing ITS->SMMU->NC use case. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.