Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751497AbdLTFDZ (ORCPT ); Wed, 20 Dec 2017 00:03:25 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:40934 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271AbdLTFDW (ORCPT ); Wed, 20 Dec 2017 00:03:22 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4562B6032C 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=mgautam@codeaurora.org Subject: Re: [PATCH v3 02/16] phy: qcom-qmp: Adapt to clk_bulk_* APIs To: Vivek Gautam Cc: Kishon Vijay Abraham I , linux-arm-msm , Linux USB Mailing List , Varadarajan Narayanan , Wei Yongjun , Fengguang Wu , "open list:GENERIC PHY FRAMEWORK" References: <1511256206-1587-1-git-send-email-mgautam@codeaurora.org> <1511256206-1587-3-git-send-email-mgautam@codeaurora.org> From: Manu Gautam Message-ID: <74306e8c-acbc-f21c-fefc-0a719f06329c@codeaurora.org> Date: Wed, 20 Dec 2017 10:33:16 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1653 Lines: 53 On 12/20/2017 8:07 AM, Vivek Gautam wrote: > Hi Manu, > > [snip] > >> @@ -998,29 +992,17 @@ static int qcom_qmp_phy_reset_init(struct device *dev) >> static int qcom_qmp_phy_clk_init(struct device *dev) >> { >> struct qcom_qmp *qmp = dev_get_drvdata(dev); >> - int ret, i; >> + int num = qmp->cfg->num_clks; >> + int i; >> >> - qmp->clks = devm_kcalloc(dev, qmp->cfg->num_clks, >> - sizeof(*qmp->clks), GFP_KERNEL); >> + qmp->clks = devm_kcalloc(dev, num, sizeof(*qmp->clks), GFP_KERNEL); >> if (!qmp->clks) >> return -ENOMEM; >> >> - for (i = 0; i < qmp->cfg->num_clks; i++) { >> - struct clk *_clk; >> - const char *name = qmp->cfg->clk_list[i]; >> - >> - _clk = devm_clk_get(dev, name); >> - if (IS_ERR(_clk)) { >> - ret = PTR_ERR(_clk); >> - if (ret != -EPROBE_DEFER) >> - dev_err(dev, "failed to get %s clk, %d\n", >> - name, ret); >> - return ret; >> - } >> - qmp->clks[i] = _clk; >> - } >> + for (i = 0; i < num; i++) >> + qmp->clks->id = qmp->cfg->clk_list[i]; > I think i missed this one while rebasing. > We need to use index with this. Should be: > qmp->clks[i]->id = qmp->cfg->clk_list[i]; > Thanks, I will change this accordingly in next version. > Regards > Vivek > > -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project