From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752031AbdBNDrM (ORCPT ); Mon, 13 Feb 2017 22:47:12 -0500 Received: from mail-it0-f49.google.com ([209.85.214.49]:38596 "EHLO mail-it0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751834AbdBNDrK (ORCPT ); Mon, 13 Feb 2017 22:47:10 -0500 Date: Tue, 14 Feb 2017 09:17:03 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Linux PM , Srinivas Pandruvada , LKML Subject: Re: PATCH] cpufreq: Do not clear real_cpus mask on policy init Message-ID: <20170214034703.GC3537@vireshk-i7> References: <11448597.UpH3K2oSNs@aspire.rjw.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11448597.UpH3K2oSNs@aspire.rjw.lan> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13-02-17, 13:44, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If new_policy is set in cpufreq_online(), the policy object has just > been created and its real_cpus mask has been zeroed on allocation, > and the driver's ->init() callback should not touch it. > > It doesn't need to be cleared again, so don't do that. > > Signed-off-by: Rafael J. Wysocki > --- > drivers/cpufreq/cpufreq.c | 2 -- > 1 file changed, 2 deletions(-) > > Index: linux-pm/drivers/cpufreq/cpufreq.c > =================================================================== > --- linux-pm.orig/drivers/cpufreq/cpufreq.c > +++ linux-pm/drivers/cpufreq/cpufreq.c > @@ -1166,8 +1166,6 @@ static int cpufreq_online(unsigned int c > if (new_policy) { > /* related_cpus should at least include policy->cpus. */ > cpumask_copy(policy->related_cpus, policy->cpus); > - /* Clear mask of registered CPUs */ > - cpumask_clear(policy->real_cpus); > } > > /* Acked-by: Viresh Kumar -- viresh