Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp428255ybk; Wed, 13 May 2020 04:01:36 -0700 (PDT) X-Google-Smtp-Source: APiQypKKx48ylYZ9y1QqqQK5OZUIRrPxYIJ0DopazoKw3u32ffOdyI7eIC25VZpaCg9UNBXdAKR8 X-Received: by 2002:a05:6402:22d5:: with SMTP id dm21mr21034521edb.275.1589367696619; Wed, 13 May 2020 04:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589367696; cv=none; d=google.com; s=arc-20160816; b=HWSJMlOAdHOPOmh2MCaNkv3KGmdAG5s74HbSFnvy3Wtvwnnf6Cyg+3Ayae+hF4XBCl 8gHmkmXFNPJf8XBQUx3Hv+hEsdi9Oio5GwpUeLPdPcwOS8+25KFWmh246yu9ViY9Cwnl rb587TevWuI61H9fztIPxolX02HuIiGlEsPUEtKhWmNJbyO2bwHuNvdBdxzDLHEVredX JeMjWKxvE/Ip0L4NJYJa4DuNwQCzc4tP8NwkZW1s8uA8lwSXxj5wn0V4MNoN/6NX8qoi N6Z8Wq9n40DTA0jtTFk+D42q4npmZWxk029Tu3OtvKRYQcgYT8TyzzDf5c0LxvzGPDCl 6HwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xht2lyYjw3RWBPZeMoeAYqlmyNVt9OCwJ+waHrDKeEg=; b=hgNL/jGxoB68oTjaCBuzq3hWhAsYHm/AzzSck2k+K4ibJYQXexTPzO/qgGnr8tstTK 1ErQ6q6fp6/B9AAe5/3dbmy48hvlqsTyGyocg8c/DGXc6D9LNjyf8W9of4fEWzyztOMX OprMCJpI0ayP02q0JZR84eduAn1omcDSDfliQGZAWKOIfBv0vVGcdn2IffMb3d201KI4 WV9ZTH/wVHNaXL6qYtF2pIARXIRG+VjyX3oPycJ8FbwL+PF/D7lmhPAd1/8OEy+hIrIN e5TQkSDAeFnATx7cSChUD7Buq3tZdyOSxt0q+YWYWCHgr7wNt7BiQ+sILAL7IvxEdo74 mx3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gc7Z967+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si5479788ejw.152.2020.05.13.04.01.13; Wed, 13 May 2020 04:01:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gc7Z967+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730064AbgEMHBK (ORCPT + 99 others); Wed, 13 May 2020 03:01:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726020AbgEMHBH (ORCPT ); Wed, 13 May 2020 03:01:07 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CEF1C061A0C for ; Wed, 13 May 2020 00:01:07 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id l73so1391548pjb.1 for ; Wed, 13 May 2020 00:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xht2lyYjw3RWBPZeMoeAYqlmyNVt9OCwJ+waHrDKeEg=; b=gc7Z967+/+x+Rsbye80nih3OeRQBVS5NToLQHZqZX+ApJYFJOElSd40Ra1HZnEg0Ph Rx2a25ItsdZYotcejlAzUajOLBv0Vnw5ZBenOEJq38l9jyTu8H/YRIH6kNiTvovcXWi+ ozcgLpWi6yUqbLk8B4b0HtezRWolYau49baOajAyrR11aE5vDgJAEV4M5R2XXlFHGrE+ zXaBEMliC1qhG+8pH8YW8gH4LhQW+5/gUBaFAIDJQHDyQB0YxQMBzfkSXtKHxlIR2hFU L/oJ4yD0kfAZ4LdFXX7JxBEcAeCXRMAksgQ6Svtqo6gbrQF5F/89tu1uxZ7CMWW7+Hz3 Yh2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xht2lyYjw3RWBPZeMoeAYqlmyNVt9OCwJ+waHrDKeEg=; b=Vptg3T9NMS8gAB9JKYAe6OayTwcKzPmUR9HUApz57WgYbmigxcMkp9acpvpRiCgHCo /Z8/d35+M+8hjHi3Mpg6UqR/uNT4cYL27v/FhKQJclTDy/9c45pRQ1FvEQ4CxpDK9d2F NddumOklOuWSC25KavIzkfIb9FXO+PkO5IkwuYtr+7tba7NUT48mP63P3u8AsnrwBCLm vZOzuH1gCMbJ/TaIobXQXufd/EpnBJFcJ3npvfJSZptW+MckD5MZLxcS8mxuxjC0RtBa F0qKmFd8fP/oORAy8+0fWhzh0Jl8S354a4KCEPftLcnwQR815gZxlqbzxQywki3DK+GQ SiVw== X-Gm-Message-State: AOAM533itcbaqymdgys3lm+7j+Z/QafB0ZsrkD1M+LAPV2E8Z7Dgpx7j XFclb6fy8lTKHhkETdMV6Oe+7w== X-Received: by 2002:a17:90a:bb81:: with SMTP id v1mr1808779pjr.168.1589353266968; Wed, 13 May 2020 00:01:06 -0700 (PDT) Received: from localhost ([122.167.130.103]) by smtp.gmail.com with ESMTPSA id p190sm14234819pfp.207.2020.05.13.00.01.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 May 2020 00:01:06 -0700 (PDT) Date: Wed, 13 May 2020 12:31:04 +0530 From: Viresh Kumar To: Georgi Djakov Cc: vireshk@kernel.org, nm@ti.com, sboyd@kernel.org, rjw@rjwysocki.net, saravanak@google.com, sibis@codeaurora.org, mka@chromium.org, robh+dt@kernel.org, rnayak@codeaurora.org, bjorn.andersson@linaro.org, vincent.guittot@linaro.org, jcrouse@codeaurora.org, evgreen@chromium.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 04/10] OPP: Add support for parsing interconnect bandwidth Message-ID: <20200513070104.yr4jtfu3pyib2qts@vireshk-i7> References: <20200512125327.1868-1-georgi.djakov@linaro.org> <20200512125327.1868-5-georgi.djakov@linaro.org> <20200513064139.5kxjjddcooqcvny3@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200513064139.5kxjjddcooqcvny3@vireshk-i7> User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13-05-20, 12:11, Viresh Kumar wrote: > On 12-05-20, 15:53, Georgi Djakov wrote: > > The OPP bindings now support bandwidth values, so add support to parse it > > from device tree and store it into the new dev_pm_opp_icc_bw struct, which > > is part of the dev_pm_opp. > > > > Signed-off-by: Georgi Djakov > > --- > > v8: > > * Drop bandwidth requests and free memory in _opp_table_kref_release. > > * Take into account the supply_count in struct size calculations. > > * Free the temporary arrays for peak and average bandwidth. > > * Fix the check for opp-level. > > * Use dev_warn insted of dev_dbg. > > * Rename _of_find_icc_paths to _of_find_icc_paths. > > * Rename the variable count to supply_count. > > Added this delta to this patch: +this :) diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 15f30ed70bbc..06e38f95116c 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -336,7 +336,7 @@ int dev_pm_opp_of_find_icc_paths(struct device *dev, struct opp_table *opp_table) { struct device_node *np; - int ret, i, count, num_paths; + int ret = 0, i, count, num_paths; struct icc_path **paths; np = of_node_get(dev->of_node); @@ -375,10 +375,9 @@ int dev_pm_opp_of_find_icc_paths(struct device *dev, if (opp_table) { opp_table->paths = paths; opp_table->path_count = num_paths; + return 0; } - return 0; - err: while (i--) icc_put(paths[i]); -- viresh