From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A554C4361B for ; Tue, 8 Dec 2020 05:51:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 119B923A69 for ; Tue, 8 Dec 2020 05:51:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726722AbgLHFvn (ORCPT ); Tue, 8 Dec 2020 00:51:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbgLHFvm (ORCPT ); Tue, 8 Dec 2020 00:51:42 -0500 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0F82C061749 for ; Mon, 7 Dec 2020 21:50:56 -0800 (PST) Received: by mail-pf1-x444.google.com with SMTP id t7so12836368pfh.7 for ; Mon, 07 Dec 2020 21:50:56 -0800 (PST) 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=6m3opYu0ZIz6W26OLN1G8zHJToF9eLQnKkxue86QI9o=; b=U7KAdv79dkrW5Nexusu4yT7KBKAmQuwyloiJHvF7xZacZMhK4K2ebv4dVabhWUKaH/ yaq5PQNf+CBrcTX4WpaINFOfBeh+QmR5DJToPqKG4S3RKtC08koGS1yqWjQh9pUR1fgI QlF2QUOnJPiLEW1L/BnC1tgnSmIFxLDR7AbNg5OiWIB8QmTb7FZbU9ud0EDKD9Ww2MGs BJH7MyoqpWPeZPx4rIyYnKXls1yKvd08mE0NTPticvB7TER4vA8QJycXAXjkZ4CWlrzi OTDbmL1ZdTa1ZKjZHV2MiHVdE0McWPqYE3hjbk4EfeAEZ2o2eCxvWmMuzz2OFlI3A4O+ P4Eg== 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=6m3opYu0ZIz6W26OLN1G8zHJToF9eLQnKkxue86QI9o=; b=EM0dZ9rDbmCqcT7sYwxUbY2ggFNkIeRQ3xIiQ5erNQLgFwCwJtxrf4LB/D4Bfawxwj qW7slH36RSiqZaXm52U5cbW+kmfQUjGc5Sm4Qy+Oa6sNlOLgP4Ta0hU2LectUOkUHK9M Smj9mE/KL1C8W7688dChP8AkOIDp/22YwWcamx1Z6UWleOKlhMHJPRMhura3O33ClvYz dlplIQ88BxqUJ0IfTJMvdCrqffRMOuocGfkLtZZhU1tl79uTFUt7oGnBhx5QbZC0lizI /ZTViOMdgL0Q4pgk97rkV5tGeJhufGJZ7F9qHBFme8hl8SyEp99/c3UU8k5zBj+PaoFw pbbw== X-Gm-Message-State: AOAM5312L54SfUCAOh9eI9ZZWKiBsjI5Oko69L3fbajjdKNpHkfODMGf LQ16wNuQG4Qwrn7v4u8PMT4h1Q== X-Google-Smtp-Source: ABdhPJzPPrMpdq9bQ7ACUwUsZAr0/UZBTss4ApskHzyJzFHFQHOSukNjkGBBMoXrxoL6+YdGeLMoFg== X-Received: by 2002:a17:90a:f194:: with SMTP id bv20mr2612367pjb.11.1607406656352; Mon, 07 Dec 2020 21:50:56 -0800 (PST) Received: from localhost ([122.172.136.109]) by smtp.gmail.com with ESMTPSA id kb12sm1431328pjb.2.2020.12.07.21.50.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2020 21:50:55 -0800 (PST) Date: Tue, 8 Dec 2020 11:20:53 +0530 From: Viresh Kumar To: Nicola Mazzucato Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, sudeep.holla@arm.com, rjw@rjwysocki.net, vireshk@kernel.org, robh+dt@kernel.org, sboyd@kernel.org, nm@ti.com, daniel.lezcano@linaro.org, morten.rasmussen@arm.com, chris.redpath@arm.com Subject: Re: [PATCH v4 3/4] scmi-cpufreq: get opp_shared_cpus from opp-v2 for EM Message-ID: <20201208055053.kggxw26kxtnpneua@vireshk-i7> References: <20201202172356.10508-1-nicola.mazzucato@arm.com> <20201202172356.10508-4-nicola.mazzucato@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201202172356.10508-4-nicola.mazzucato@arm.com> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02-12-20, 17:23, Nicola Mazzucato wrote: > By design, SCMI performance domains define the granularity of > performance controls, they do not describe any underlying hardware > dependencies (although they may match in many cases). > > It is therefore possible to have some platforms where hardware may have > the ability to control CPU performance at different granularity and choose > to describe fine-grained performance control through SCMI. > > In such situations, the energy model would be provided with inaccurate > information based on controls, while it still needs to know the > performance boundaries. > > To restore correct functionality, retrieve information of CPUs under the > same v/f domain from operating-points-v2 in DT, and pass it on to EM. > > Signed-off-by: Nicola Mazzucato > --- > drivers/cpufreq/scmi-cpufreq.c | 51 +++++++++++++++++++++++----------- > 1 file changed, 35 insertions(+), 16 deletions(-) > > diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c > index 491a0a24fb1e..f505efcc62b1 100644 > --- a/drivers/cpufreq/scmi-cpufreq.c > +++ b/drivers/cpufreq/scmi-cpufreq.c > @@ -127,6 +127,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) > struct cpufreq_frequency_table *freq_table; > struct em_data_callback em_cb = EM_DATA_CB(scmi_get_cpu_power); > bool power_scale_mw; > + cpumask_var_t opp_shared_cpus; > > cpu_dev = get_cpu_device(policy->cpu); > if (!cpu_dev) { > @@ -134,30 +135,45 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) > return -ENODEV; > } > > - ret = handle->perf_ops->device_opps_add(handle, cpu_dev); > - if (ret) { > - dev_warn(cpu_dev, "failed to add opps to the device\n"); > - return ret; > - } > + if (!zalloc_cpumask_var(&opp_shared_cpus, GFP_KERNEL)) > + return -ENOMEM; > > ret = scmi_get_sharing_cpus(cpu_dev, policy->cpus); > if (ret) { > dev_warn(cpu_dev, "failed to get sharing cpumask\n"); > - return ret; > + goto out_free_cpumask; > } > > - ret = dev_pm_opp_set_sharing_cpus(cpu_dev, policy->cpus); > - if (ret) { > - dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n", > - __func__, ret); > - return ret; > + /* > + * The OPP 'sharing cpus' info may come from dt through an empty opp > + * table and opp-shared. If found, it takes precedence over the SCMI > + * domain IDs info. > + */ > + ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, opp_shared_cpus); > + if (ret || !cpumask_weight(opp_shared_cpus)) { > + /* > + * Either opp-table is not set or no opp-shared was found, > + * use the information from SCMI domain IDs. > + */ > + cpumask_copy(opp_shared_cpus, policy->cpus); > } > > nr_opp = dev_pm_opp_get_opp_count(cpu_dev); > if (nr_opp <= 0) { > - dev_dbg(cpu_dev, "OPP table is not ready, deferring probe\n"); > - ret = -EPROBE_DEFER; > - goto out_free_opp; > + ret = handle->perf_ops->device_opps_add(handle, cpu_dev); > + if (ret) { > + dev_warn(cpu_dev, "failed to add opps to the device\n"); > + goto out_free_cpumask; > + } > + > + ret = dev_pm_opp_set_sharing_cpus(cpu_dev, opp_shared_cpus); > + if (ret) { > + dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n", > + __func__, ret); > + goto out_free_cpumask; > + } > + Why do we need to call above two after calling dev_pm_opp_get_opp_count() ? And we don't check the return value of the below call anymore, moreover we have to call it twice now. > + nr_opp = dev_pm_opp_get_opp_count(cpu_dev); > } > > priv = kzalloc(sizeof(*priv), GFP_KERNEL); > @@ -191,15 +207,18 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) > handle->perf_ops->fast_switch_possible(handle, cpu_dev); > > power_scale_mw = handle->perf_ops->power_scale_mw_get(handle); > - em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, policy->cpus, > + em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, opp_shared_cpus, > power_scale_mw); > > - return 0; > + ret = 0; ret is already 0 here. > + goto out_free_cpumask; > > out_free_priv: > kfree(priv); > out_free_opp: > dev_pm_opp_remove_all_dynamic(cpu_dev); > +out_free_cpumask: > + free_cpumask_var(opp_shared_cpus); > > return ret; > } > -- > 2.27.0 -- viresh From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0952C433FE for ; Tue, 8 Dec 2020 05:52:06 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7C88023A63 for ; Tue, 8 Dec 2020 05:52:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C88023A63 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=q7sQemFmlMRsfsUsetWemsQdwOZuFU/6VA4ggNJ1meg=; b=kXeG4Q15/h1owC1pGgCAie2mx Kh9ufcQ9+x+QYn3wgbjEf1AguSDTylKbS8P/Delhv2L6SVYR1T1QK8osl9joYNoYBan9elGlNrYSZ dx7c6RBWA+fz/GK0IX30ypcvYpsMCY4/xB8Pt+kAXTe1eshLquZ1q+Y54MCVmCfBznPTUwBMbYZt9 pMk0jgy9qQ8w+N3tK9Q7QkCK6Q5czJ+LbzeRagUUK3gJgJvsOO+tKk2uBlZrLrYVKYiUGW6O1BrXT r3O/J8kI6f1xH/FmSEBFmuu/ll3sCrqx/WCx9x5cR2hohXVLuzxjmBX5s0W3wjZ1FJ0wWOY+lFWdt vvOL6+4tg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmVtt-000819-MV; Tue, 08 Dec 2020 05:51:01 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmVtq-00080N-JP for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2020 05:50:59 +0000 Received: by mail-pg1-x544.google.com with SMTP id f17so11201374pge.6 for ; Mon, 07 Dec 2020 21:50:58 -0800 (PST) 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=6m3opYu0ZIz6W26OLN1G8zHJToF9eLQnKkxue86QI9o=; b=U7KAdv79dkrW5Nexusu4yT7KBKAmQuwyloiJHvF7xZacZMhK4K2ebv4dVabhWUKaH/ yaq5PQNf+CBrcTX4WpaINFOfBeh+QmR5DJToPqKG4S3RKtC08koGS1yqWjQh9pUR1fgI QlF2QUOnJPiLEW1L/BnC1tgnSmIFxLDR7AbNg5OiWIB8QmTb7FZbU9ud0EDKD9Ww2MGs BJH7MyoqpWPeZPx4rIyYnKXls1yKvd08mE0NTPticvB7TER4vA8QJycXAXjkZ4CWlrzi OTDbmL1ZdTa1ZKjZHV2MiHVdE0McWPqYE3hjbk4EfeAEZ2o2eCxvWmMuzz2OFlI3A4O+ P4Eg== 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=6m3opYu0ZIz6W26OLN1G8zHJToF9eLQnKkxue86QI9o=; b=EQkE24fpZ7KeYukQWy0s5w4JiZkqYH7ecCuJDKF6arZd4GekkJvQSu+o9JT27C071k dLyfD7GVev9o/649NhCF6jzlP21rR6UfUdNuU2tSUMTkK7XMzX277guJTSq7hKaenapa 9Xn6OteXWFb/bWyQVKNbo1hBjPgoUxdATX/pYmtj1ue9TP/cIcmdA6W93yodPiHx21jN KmR4C0rqu59CoPn9IyBb/GvP8KYGlHdZQCO0o3Rv1s0WrkjvjZCZ5Wh+gz99zI6paMhR bO6CDN9swXOCXguX/7Mh6+ETKbYHS5Z8su5k3GbByR+AtUZ4BZsLl0cFU5i/cLQ1cHJj Z22Q== X-Gm-Message-State: AOAM530cyicgOguJHWhI6HC6ldePEmtX3oWKgTNzr8uCj2aOHiTXxQ1h YDyRFNvQ1mVgV/rJB3RhOeB4Mw== X-Google-Smtp-Source: ABdhPJzPPrMpdq9bQ7ACUwUsZAr0/UZBTss4ApskHzyJzFHFQHOSukNjkGBBMoXrxoL6+YdGeLMoFg== X-Received: by 2002:a17:90a:f194:: with SMTP id bv20mr2612367pjb.11.1607406656352; Mon, 07 Dec 2020 21:50:56 -0800 (PST) Received: from localhost ([122.172.136.109]) by smtp.gmail.com with ESMTPSA id kb12sm1431328pjb.2.2020.12.07.21.50.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Dec 2020 21:50:55 -0800 (PST) Date: Tue, 8 Dec 2020 11:20:53 +0530 From: Viresh Kumar To: Nicola Mazzucato Subject: Re: [PATCH v4 3/4] scmi-cpufreq: get opp_shared_cpus from opp-v2 for EM Message-ID: <20201208055053.kggxw26kxtnpneua@vireshk-i7> References: <20201202172356.10508-1-nicola.mazzucato@arm.com> <20201202172356.10508-4-nicola.mazzucato@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201202172356.10508-4-nicola.mazzucato@arm.com> User-Agent: NeoMutt/20180716-391-311a52 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201208_005058_925857_35E79D10 X-CRM114-Status: GOOD ( 30.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: nm@ti.com, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, sboyd@kernel.org, vireshk@kernel.org, daniel.lezcano@linaro.org, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, robh+dt@kernel.org, sudeep.holla@arm.com, chris.redpath@arm.com, morten.rasmussen@arm.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 02-12-20, 17:23, Nicola Mazzucato wrote: > By design, SCMI performance domains define the granularity of > performance controls, they do not describe any underlying hardware > dependencies (although they may match in many cases). > > It is therefore possible to have some platforms where hardware may have > the ability to control CPU performance at different granularity and choose > to describe fine-grained performance control through SCMI. > > In such situations, the energy model would be provided with inaccurate > information based on controls, while it still needs to know the > performance boundaries. > > To restore correct functionality, retrieve information of CPUs under the > same v/f domain from operating-points-v2 in DT, and pass it on to EM. > > Signed-off-by: Nicola Mazzucato > --- > drivers/cpufreq/scmi-cpufreq.c | 51 +++++++++++++++++++++++----------- > 1 file changed, 35 insertions(+), 16 deletions(-) > > diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c > index 491a0a24fb1e..f505efcc62b1 100644 > --- a/drivers/cpufreq/scmi-cpufreq.c > +++ b/drivers/cpufreq/scmi-cpufreq.c > @@ -127,6 +127,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) > struct cpufreq_frequency_table *freq_table; > struct em_data_callback em_cb = EM_DATA_CB(scmi_get_cpu_power); > bool power_scale_mw; > + cpumask_var_t opp_shared_cpus; > > cpu_dev = get_cpu_device(policy->cpu); > if (!cpu_dev) { > @@ -134,30 +135,45 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) > return -ENODEV; > } > > - ret = handle->perf_ops->device_opps_add(handle, cpu_dev); > - if (ret) { > - dev_warn(cpu_dev, "failed to add opps to the device\n"); > - return ret; > - } > + if (!zalloc_cpumask_var(&opp_shared_cpus, GFP_KERNEL)) > + return -ENOMEM; > > ret = scmi_get_sharing_cpus(cpu_dev, policy->cpus); > if (ret) { > dev_warn(cpu_dev, "failed to get sharing cpumask\n"); > - return ret; > + goto out_free_cpumask; > } > > - ret = dev_pm_opp_set_sharing_cpus(cpu_dev, policy->cpus); > - if (ret) { > - dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n", > - __func__, ret); > - return ret; > + /* > + * The OPP 'sharing cpus' info may come from dt through an empty opp > + * table and opp-shared. If found, it takes precedence over the SCMI > + * domain IDs info. > + */ > + ret = dev_pm_opp_of_get_sharing_cpus(cpu_dev, opp_shared_cpus); > + if (ret || !cpumask_weight(opp_shared_cpus)) { > + /* > + * Either opp-table is not set or no opp-shared was found, > + * use the information from SCMI domain IDs. > + */ > + cpumask_copy(opp_shared_cpus, policy->cpus); > } > > nr_opp = dev_pm_opp_get_opp_count(cpu_dev); > if (nr_opp <= 0) { > - dev_dbg(cpu_dev, "OPP table is not ready, deferring probe\n"); > - ret = -EPROBE_DEFER; > - goto out_free_opp; > + ret = handle->perf_ops->device_opps_add(handle, cpu_dev); > + if (ret) { > + dev_warn(cpu_dev, "failed to add opps to the device\n"); > + goto out_free_cpumask; > + } > + > + ret = dev_pm_opp_set_sharing_cpus(cpu_dev, opp_shared_cpus); > + if (ret) { > + dev_err(cpu_dev, "%s: failed to mark OPPs as shared: %d\n", > + __func__, ret); > + goto out_free_cpumask; > + } > + Why do we need to call above two after calling dev_pm_opp_get_opp_count() ? And we don't check the return value of the below call anymore, moreover we have to call it twice now. > + nr_opp = dev_pm_opp_get_opp_count(cpu_dev); > } > > priv = kzalloc(sizeof(*priv), GFP_KERNEL); > @@ -191,15 +207,18 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) > handle->perf_ops->fast_switch_possible(handle, cpu_dev); > > power_scale_mw = handle->perf_ops->power_scale_mw_get(handle); > - em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, policy->cpus, > + em_dev_register_perf_domain(cpu_dev, nr_opp, &em_cb, opp_shared_cpus, > power_scale_mw); > > - return 0; > + ret = 0; ret is already 0 here. > + goto out_free_cpumask; > > out_free_priv: > kfree(priv); > out_free_opp: > dev_pm_opp_remove_all_dynamic(cpu_dev); > +out_free_cpumask: > + free_cpumask_var(opp_shared_cpus); > > return ret; > } > -- > 2.27.0 -- viresh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel