From patchwork Fri Aug 16 02:25:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19187 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6F0332486D for ; Fri, 16 Aug 2013 02:27:36 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id o19sf509176qap.7 for ; Thu, 15 Aug 2013 19:27:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state: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=m42GuK/aHxu2zrMfOT6iKN/z5aVB42M0eZHy43zvmxVnQjexNe+K0uu37NmU6XpTqv VYw+2pa3hfRE5NzKFE6bddic9fNvTE6oEq/6hyvZWQp4oHWutSNHCcwvTHzddc045eYI XnGWi+XjU8NyCt0khlNu9nX8TeBCH/D1NQYT+nNWEd7eV4Uk+1Wf+bKMpjx3sxo/paSB 2OVGFSVPplQIoTEIiBokRQabv3eYHweljJLTM1jkVs71jLbH5ayVSYgH+fCkb/IcoP5A iJGVvCAMTS2Koq234/I8HR3xAcnP4C+zXV4JLa2i4TUTE8eYthvlC3Nm14tKRBg8vINP Fz2Q== X-Received: by 10.224.74.72 with SMTP id t8mr708501qaj.4.1376620056208; Thu, 15 Aug 2013 19:27:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.49 with SMTP id i17ls658667qen.44.gmail; Thu, 15 Aug 2013 19:27:36 -0700 (PDT) X-Received: by 10.58.235.69 with SMTP id uk5mr17232206vec.17.1376620056089; Thu, 15 Aug 2013 19:27:36 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id aa5si763138vdc.39.2013.08.15.19.27.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:27:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id pa12so1132272veb.30 for ; Thu, 15 Aug 2013 19:27:36 -0700 (PDT) X-Gm-Message-State: ALoCoQkw3ifIhsZFV/cqLTdoBuYvlQRkroz5T4B3L3ePWvu4xYgbpj+7zWZCFObWhzXhieAuYhwT X-Received: by 10.220.198.133 with SMTP id eo5mr3462869vcb.24.1376620055998; Thu, 15 Aug 2013 19:27:35 -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 u4csp45190vcz; Thu, 15 Aug 2013 19:27:35 -0700 (PDT) X-Received: by 10.68.76.34 with SMTP id h2mr18667234pbw.20.1376620055164; Thu, 15 Aug 2013 19:27:35 -0700 (PDT) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by mx.google.com with ESMTPS id tp5si48505pac.164.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:27:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.47 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.47; Received: by mail-pa0-f47.google.com with SMTP id kl13so1342741pab.34 for ; Thu, 15 Aug 2013 19:27:34 -0700 (PDT) X-Received: by 10.68.249.68 with SMTP id ys4mr10969820pbc.159.1376620054785; Thu, 15 Aug 2013 19:27:34 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id a5sm3111469pbw.4.2013.08.15.19.27.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 19:27:34 -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 14/34] cpufreq: ia64-acpi: remove calls to cpufreq_notify_transition() Date: Fri, 16 Aug 2013 07:55:11 +0530 Message-Id: <84963d5452aa2178f43c96c6adc87c34cdb27403.1376619363.git.viresh.kumar@linaro.org> 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.128.171 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;