From patchwork Mon Aug 3 03:06:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51837 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id E5D58229FD for ; Mon, 3 Aug 2015 03:07:09 +0000 (UTC) Received: by labjb5 with SMTP id jb5sf3921233lab.1 for ; Sun, 02 Aug 2015 20:07:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=G6R62mOHCHsRrXmvv3cdGQ2Wkw2k6xizJHP3uoKedew=; b=Rc+e/adY+QJZW16w/o2lCbxFnmsSIPdupJS5UhPOoF0vmZss67fJhzZTYeTVNHYgJO aVviXd4CcNjIQ3ZXdyh6lniBt6zx8vHQ1ic2krtxxNB5rd7a0KHUkJ3xSLA4Dt0rIs4H oXkMowy9CCniOEE20yx+tWjJl+g0OAe5EZDkNocwqb4mmEPd9Zed90yjdHlEGZ9rBUPO p5O0R3ieKLN/jeUhMXOmiFkU1vtE00DVZQ0NXE/ulZrTrmjSZOHCu3nOKEvxVNjVmfzt VsLJYyLEQy/NzHJ6Lq1oJkeCto9grvMePawPRoy87JOIMFEOyV1vYt6ksgpxIy5oNSET eX9Q== X-Gm-Message-State: ALoCoQkFasEeBL4+l+oOU9qMZzqGlEmEmh3Skud/95U0HbEiEVv07KeiRUI8Po+sm2rtTbrCC/AO X-Received: by 10.112.189.131 with SMTP id gi3mr4885230lbc.6.1438571228906; Sun, 02 Aug 2015 20:07:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.30.102 with SMTP id r6ls422642lah.100.gmail; Sun, 02 Aug 2015 20:07:08 -0700 (PDT) X-Received: by 10.152.36.102 with SMTP id p6mr14608106laj.19.1438571228729; Sun, 02 Aug 2015 20:07:08 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id c5si10796327lag.135.2015.08.02.20.07.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Aug 2015 20:07:08 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lblf12 with SMTP id f12so70923368lbl.2 for ; Sun, 02 Aug 2015 20:07:08 -0700 (PDT) X-Received: by 10.152.25.228 with SMTP id f4mr14315816lag.112.1438571228611; Sun, 02 Aug 2015 20:07:08 -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.7.198 with SMTP id l6csp1626635lba; Sun, 2 Aug 2015 20:07:07 -0700 (PDT) X-Received: by 10.66.119.70 with SMTP id ks6mr30777512pab.113.1438571225620; Sun, 02 Aug 2015 20:07:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tb2si23989280pab.75.2015.08.02.20.07.04; Sun, 02 Aug 2015 20:07:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752769AbbHCDGy (ORCPT + 28 others); Sun, 2 Aug 2015 23:06:54 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:36254 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752726AbbHCDGv (ORCPT ); Sun, 2 Aug 2015 23:06:51 -0400 Received: by pacgq8 with SMTP id gq8so13342592pac.3 for ; Sun, 02 Aug 2015 20:06:51 -0700 (PDT) X-Received: by 10.68.136.234 with SMTP id qd10mr19330495pbb.162.1438571210942; Sun, 02 Aug 2015 20:06:50 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id fy5sm15543982pdb.93.2015.08.02.20.06.49 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 02 Aug 2015 20:06:50 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 4/7] cpufreq: remove redundant 'governor' field from user_policy Date: Mon, 3 Aug 2015 08:36:17 +0530 Message-Id: X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.217.172 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: , Its always same as policy->governor, and there is no need to keep another copy of it. Remove it. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 7 ++----- include/linux/cpufreq.h | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 8e71d8e08439..3033952391fe 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -675,7 +675,6 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy, return ret; policy->user_policy.policy = policy->policy; - policy->user_policy.governor = policy->governor; return count; } @@ -1323,10 +1322,9 @@ static int cpufreq_online(unsigned int cpu) goto out_exit_policy; } - if (new_policy) { + if (new_policy) policy->user_policy.policy = policy->policy; - policy->user_policy.governor = policy->governor; - } + up_write(&policy->rwsem); kobject_uevent(&policy->kobj, KOBJ_ADD); @@ -2305,7 +2303,6 @@ int cpufreq_update_policy(unsigned int cpu) new_policy.min = policy->user_policy.min; new_policy.max = policy->user_policy.max; new_policy.policy = policy->user_policy.policy; - new_policy.governor = policy->user_policy.governor; /* * BIOS might change freq behind our back diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index bedcc90c0757..752bf8a5c314 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -55,7 +55,6 @@ struct cpufreq_real_policy { unsigned int min; /* in kHz */ unsigned int max; /* in kHz */ unsigned int policy; /* see above */ - struct cpufreq_governor *governor; /* see below */ }; struct cpufreq_policy {