From patchwork Sat Apr 4 03:07:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 46775 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 18118216D1 for ; Sat, 4 Apr 2015 03:07:18 +0000 (UTC) Received: by labgx2 with SMTP id gx2sf22169567lab.1 for ; Fri, 03 Apr 2015 20:07:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mime-version:in-reply-to:references :date:message-id:subject:from:to:cc:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=H8csAgdDWt01fYe4ItMSg/sC3912yho0LSzeb0aVBhE=; b=dYGDe/LlF0hTFQ1BbPAkBVMrUEz9VAkoe155hTv3ZFarS0UuPE9fyKQlQ9l8xHgn5z +7gguBc8O+XBnfIB/6aS6p8vW/YVeJEDFJj4ZelL4XEPLgEBkb+ou6E4LZo3tuI4pSQD HGe9IK6hx7/b24U2N8opF99qI6ThD2wQukXqiKt1N+aV0McHix6fZDxcnu6Jhn/seAUL THzdGj8J9XodN65cOY2SuUJd/pwibPCJxiAHm4rM7JkPRfBmFMewPaXfv46mMW8ct5Pa O4sYC6lgkkTB14OlLH9/2rY61mhEhDHG5HzsQX4eOSyrIBwdc84NSPIXjrqBlWvlLoZh YMig== X-Gm-Message-State: ALoCoQmNTRvnUVJYalfdWKyLNvPM1C8a6CH6TL0iWNj8PGwDpxYJovlSf6ijEbmBjWhnLXIZVQeh X-Received: by 10.112.93.203 with SMTP id cw11mr1195529lbb.0.1428116836431; Fri, 03 Apr 2015 20:07:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.227 with SMTP id b3ls321629lak.58.gmail; Fri, 03 Apr 2015 20:07:16 -0700 (PDT) X-Received: by 10.112.93.72 with SMTP id cs8mr294677lbb.15.1428116836226; Fri, 03 Apr 2015 20:07:16 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id jq16si2924931lab.7.2015.04.03.20.07.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Apr 2015 20:07:15 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lajy8 with SMTP id y8so88823899laj.0 for ; Fri, 03 Apr 2015 20:07:15 -0700 (PDT) X-Received: by 10.112.162.232 with SMTP id yd8mr4388429lbb.41.1428116835457; Fri, 03 Apr 2015 20:07:15 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.57.201 with SMTP id k9csp2252651lbq; Fri, 3 Apr 2015 20:07:14 -0700 (PDT) X-Received: by 10.70.14.226 with SMTP id s2mr8913292pdc.145.1428116833599; Fri, 03 Apr 2015 20:07:13 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sq5si14309733pab.179.2015.04.03.20.07.11; Fri, 03 Apr 2015 20:07:13 -0700 (PDT) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752133AbbDDDHL (ORCPT + 11 others); Fri, 3 Apr 2015 23:07:11 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:35528 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751730AbbDDDHK (ORCPT ); Fri, 3 Apr 2015 23:07:10 -0400 Received: by obbfy7 with SMTP id fy7so105920051obb.2 for ; Fri, 03 Apr 2015 20:07:09 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.186.100 with SMTP id fj4mr6258515obc.12.1428116829149; Fri, 03 Apr 2015 20:07:09 -0700 (PDT) Received: by 10.182.185.18 with HTTP; Fri, 3 Apr 2015 20:07:09 -0700 (PDT) In-Reply-To: <551F3C7B.7060004@codeaurora.org> References: <466c5246b6ad83b960eeb63ab34a04379448980d.1424345053.git.viresh.kumar@linaro.org> <551CC7E2.6070806@codeaurora.org> <551F3C7B.7060004@codeaurora.org> Date: Sat, 4 Apr 2015 08:37:09 +0530 Message-ID: Subject: Re: [PATCH V2 12/20] cpufreq: Mark policy->governor = NULL for inactive policies From: Viresh Kumar To: Saravana Kannan Cc: Rafael Wysocki , Linaro Kernel Mailman List , "linux-pm@vger.kernel.org" , Stephen Boyd , Prarit Bhargava Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On 4 April 2015 at 06:50, Saravana Kannan wrote: > I would strongly prefer that this is not done and just clear out the pointer > if/when the governor module is removed. Okay, I give up .. This looks fine ? return policy; @@ -2156,8 +2155,10 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor) /* clear last_governor for all inactive policies */ read_lock_irqsave(&cpufreq_driver_lock, flags); for_each_inactive_policy(policy, tpolicy) { - if (!strcmp(policy->last_governor, governor->name)) + if (!strcmp(policy->last_governor, governor->name)) { + policy->governor = NULL; strcpy(policy->last_governor, "\0"); + } } read_unlock_irqrestore(&cpufreq_driver_lock, flags); --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 4604ad5d9c0c..1f285b06d473 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1094,7 +1094,6 @@ static struct cpufreq_policy *cpufreq_policy_restore(unsigned int cpu) if (likely(policy)) { /* Policy should be inactive here */ WARN_ON(!policy_is_inactive(policy)); - policy->governor = NULL; }