From patchwork Fri Sep 13 13:02:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20247 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3FD0220358 for ; Fri, 13 Sep 2013 13:26:00 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id gf11sf1211722vcb.2 for ; Fri, 13 Sep 2013 06:26:00 -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 :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=IJcUwAm5zN6823/1G5y7CipwF0pmNU8ta0M55Ef3WNU=; b=IV0tbMJ85Jlq1Epr1h8H6k9qk+OEj75ukcHAB/VoRX3zipjQ+eTwufzuHfW0Ezh2kc 5R0F3kl6RC/Oerz1/zaR6PgKpuY4dwqpYikpVmtIaROM+jiZOvbedhlDwfBYR8lQSt3Z lxVwgHFyzaqNkfa+RQwATmkZHA358S1HH+IKnK8LUQmk183pFoyw3qNEwdDVLf3S1fEk fVz4jdfPQMsVmneD/Q0LTRNEOJpGXTCxrkW5Z02f/gz3XiM7Jr6EVGxO7/EHKoyMnjHt N3qL1QyqALImRIO77UyE6vs/G5hRGqVo33NQGBMfRpXcWQBDXRoDwBzyeMWExq4OIWg2 uyEw== X-Gm-Message-State: ALoCoQn+RANTgxlJIu8PymbXAQI/lVlc/3U7oaibFpdGdbTAt65MpiIic0m3jRdGgxbiFkk0GFYy X-Received: by 10.236.111.73 with SMTP id v49mr5037449yhg.46.1379078760016; Fri, 13 Sep 2013 06:26:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.11.179 with SMTP id r19ls1124611qeb.76.gmail; Fri, 13 Sep 2013 06:25:59 -0700 (PDT) X-Received: by 10.58.190.34 with SMTP id gn2mr95911vec.34.1379078759819; Fri, 13 Sep 2013 06:25:59 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id st7si3123627vdc.42.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:25:59 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so943944vcb.0 for ; Fri, 13 Sep 2013 06:25:59 -0700 (PDT) X-Received: by 10.221.64.17 with SMTP id xg17mr11981309vcb.5.1379078759727; Fri, 13 Sep 2013 06:25:59 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp80641vcz; Fri, 13 Sep 2013 06:25:59 -0700 (PDT) X-Received: by 10.68.213.167 with SMTP id nt7mr13507590pbc.140.1379078758818; Fri, 13 Sep 2013 06:25:58 -0700 (PDT) Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by mx.google.com with ESMTPS id hg4si7430965pbc.345.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:25:58 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.42 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.42; Received: by mail-pb0-f42.google.com with SMTP id un15so1243220pbc.15 for ; Fri, 13 Sep 2013 06:25:58 -0700 (PDT) X-Received: by 10.68.64.201 with SMTP id q9mr13536791pbs.15.1379078758348; Fri, 13 Sep 2013 06:25:58 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id zi1sm11754977pbb.28.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:25:57 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Viresh Kumar , Tony Luck Subject: [PATCH 193/228] cpufreq: ia64-acpi: remove calls to cpufreq_notify_transition() Date: Fri, 13 Sep 2013 18:32:19 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Most of the drivers do following in their ->target_index() routines: struct cpufreq_freqs freqs; freqs.old = old freq... freqs.new = new freq... cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE); /* Change rate here */ cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); This is replicated over all cpufreq drivers today and there doesn't exists a good enough reason why this shouldn't be moved to cpufreq core instead. Earlier patches have added support in cpufreq core to do cpufreq notification on frequency change, this one removes it from this driver. Some related minor cleanups are also done along with it. Cc: Tony Luck Signed-off-by: Viresh Kumar --- drivers/cpufreq/ia64-acpi-cpufreq.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c index 4695fa2..53c6ac6 100644 --- a/drivers/cpufreq/ia64-acpi-cpufreq.c +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c @@ -141,7 +141,6 @@ processor_set_freq ( { int ret = 0; u32 value = 0; - struct cpufreq_freqs cpufreq_freqs; cpumask_t saved_mask; int retval; @@ -168,13 +167,6 @@ processor_set_freq ( pr_debug("Transitioning from P%d to P%d\n", data->acpi_data.state, state); - /* cpufreq frequency struct */ - cpufreq_freqs.old = data->freq_table[data->acpi_data.state].frequency; - cpufreq_freqs.new = data->freq_table[state].frequency; - - /* notify cpufreq */ - cpufreq_notify_transition(policy, &cpufreq_freqs, CPUFREQ_PRECHANGE); - /* * First we write the target state's 'control' value to the * control_register. @@ -186,22 +178,11 @@ processor_set_freq ( ret = processor_set_pstate(value); if (ret) { - unsigned int tmp = cpufreq_freqs.new; - cpufreq_notify_transition(policy, &cpufreq_freqs, - CPUFREQ_POSTCHANGE); - cpufreq_freqs.new = cpufreq_freqs.old; - cpufreq_freqs.old = tmp; - cpufreq_notify_transition(policy, &cpufreq_freqs, - CPUFREQ_PRECHANGE); - cpufreq_notify_transition(policy, &cpufreq_freqs, - CPUFREQ_POSTCHANGE); printk(KERN_WARNING "Transition failed with error %d\n", ret); retval = -ENODEV; goto migrate_end; } - cpufreq_notify_transition(policy, &cpufreq_freqs, CPUFREQ_POSTCHANGE); - data->acpi_data.state = state; retval = 0;