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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 780D2C4BA0E for ; Wed, 26 Feb 2020 10:22:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4B24B20801 for ; Wed, 26 Feb 2020 10:22:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727359AbgBZKWN (ORCPT ); Wed, 26 Feb 2020 05:22:13 -0500 Received: from foss.arm.com ([217.140.110.172]:33336 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbgBZKWN (ORCPT ); Wed, 26 Feb 2020 05:22:13 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 891421FB; Wed, 26 Feb 2020 02:22:12 -0800 (PST) Received: from localhost (unknown [10.1.198.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2A7F23F9E6; Wed, 26 Feb 2020 02:22:12 -0800 (PST) Date: Wed, 26 Feb 2020 10:22:10 +0000 From: Ionela Voinescu To: Pavan Kondeti Cc: catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, maz@kernel.org, suzuki.poulose@arm.com, sudeep.holla@arm.com, lukasz.luba@arm.com, valentin.schneider@arm.com, dietmar.eggemann@arm.com, rjw@rjwysocki.net, peterz@infradead.org, mingo@redhat.com, vincent.guittot@linaro.org, viresh.kumar@linaro.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v4 6/7] arm64: use activity monitors for frequency invariance Message-ID: <20200226102210.GB19513@arm.com> References: <20200224141142.25445-1-ionela.voinescu@arm.com> <20200224141142.25445-7-ionela.voinescu@arm.com> <20200226095134.GM28029@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200226095134.GM28029@codeaurora.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Hi Pavan, On Wednesday 26 Feb 2020 at 15:21:34 (+0530), Pavan Kondeti wrote: > On Mon, Feb 24, 2020 at 02:11:41PM +0000, Ionela Voinescu wrote: > > [...] > > > +static int __init init_amu_fie(void) > > +{ > > + cpumask_var_t valid_cpus; > > + bool have_policy = false; > > + int cpu; > > + > > + if (!zalloc_cpumask_var(&valid_cpus, GFP_KERNEL) || > > + !zalloc_cpumask_var(&amu_fie_cpus, GFP_KERNEL)) > > + return -ENOMEM; > > The patch looks good to me. one minor comment here. In an unlikely > scenario, valid_cpus which is a temporary mask can get allocated > but amu_fie_cpus may not. In that case, we have to free valid_cpus > here. I have seen some static code inspection tools catching these > type of errors. If you happen to rebase this series, fix this. > Thank you for the review! I am just about to push v5 and I'll add this fix as well. Thank you, Ionela. > Thanks, > Pavan > > -- > Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.