From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751259AbeADXel (ORCPT + 1 other); Thu, 4 Jan 2018 18:34:41 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:56426 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751091AbeADXej (ORCPT ); Thu, 4 Jan 2018 18:34:39 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E998060246 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH] dmaengine: qcom_hidma: simplify DT resource parsing To: Rob Herring , Vinod Koul Cc: linux-kernel@vger.kernel.org, Andy Gross , David Brown , Dan Williams , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, dmaengine@vger.kernel.org References: <20180104224542.15333-2-robh@kernel.org> From: Sinan Kaya Message-ID: <4169dc20-0c3d-d8b6-96ed-9b16c35be441@codeaurora.org> Date: Thu, 4 Jan 2018 18:34:34 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180104224542.15333-2-robh@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 1/4/2018 5:45 PM, Rob Herring wrote: > The hidma driver open codes populating address and IRQ resources from DT. > We have standard functions of_address_to_resource and of_irq_to_resource > for this, so use them instead. > > The DT binding states each child should have 2 addresses and 1 IRQ, so we > can simplify the logic and do a fixed size resource allocation. Using the > standard of_address_to_resource will also do any address translation which > was missing. > > Cc: Andy Gross > Cc: David Brown > Cc: Dan Williams > Cc: Vinod Koul > Cc: linux-arm-msm@vger.kernel.org > Cc: linux-soc@vger.kernel.org > Cc: dmaengine@vger.kernel.org > Signed-off-by: Rob Herring > --- > drivers/dma/qcom/hidma_mgmt.c | 61 +++++++++++-------------------------------- > 1 file changed, 15 insertions(+), 46 deletions(-) Thanks, this certainly looks cleaner. Mine was mostly copy/paste from other examples. Reviewed-by: Sinan Kaya -- 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.