From patchwork Mon Feb 22 11:06:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 62553 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1157908lbl; Mon, 22 Feb 2016 03:07:10 -0800 (PST) X-Received: by 10.66.251.194 with SMTP id zm2mr37622702pac.131.1456139230585; Mon, 22 Feb 2016 03:07:10 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si39105740par.37.2016.02.22.03.07.10; Mon, 22 Feb 2016 03:07:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753991AbcBVLHJ (ORCPT + 11 others); Mon, 22 Feb 2016 06:07:09 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:35227 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753987AbcBVLHI (ORCPT ); Mon, 22 Feb 2016 06:07:08 -0500 Received: by mail-pa0-f48.google.com with SMTP id ho8so92075670pac.2 for ; Mon, 22 Feb 2016 03:07:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=VGrCqDTMQ3mn8Nwm2Go+Xh21ag3fv/IzAseiPBH4Tc8=; b=HRncTeCzkBWmmnYWIRpl5zOdKKsPovN4cmkqeEV9W8+V8iy/JzjgzV/OU8qZ+jdWtK yXGjpfPkIJ7ntTMwkAKOKdL5qBli5wesYsO+P032bpgrlnXLAcXmkSr56PWnMUtG5R6k OEdkbWM90Cjo/hy5MsdkDSRXFSg6wTshRvI+k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=VGrCqDTMQ3mn8Nwm2Go+Xh21ag3fv/IzAseiPBH4Tc8=; b=WdYHYTJfRLkTF+AXcmxSmfsa2Cqnx0sr/S9OD0Cv7IIH6Rmf9r50tK2/nHEF2nChvT 76VGo5nOkXiw00eGqvTjaiidPnzS2Qd8ub4Rf5gPOjT0+X3f0/L+3nvKWIVKkgrJJWBN sh+OABKh6zHNW2SW9p9rSXUhCCo2II9cSzCYx8PRCYtRibVVN2RN8IITmlHuUrixUx7L 62A18TrnsNAM1hKeTlf5w6BhQJe0Q+sfBaPxKL2UgHlFfzRvj5u81Nw/1P0fRUAJWvev Jk5D9/C8LY7Vf9FRpkWpD3s1T/10mVNKvHp0hHwbtv+CfYuvX1dOcgvZm0bt7LOjYOji L29w== X-Gm-Message-State: AG10YORdCPMK2kMprtKBNhOPGiKuPFwNolH1LXc5vUaQ3GkxVyVHyrr7EHzj3S9DBeSh2jxN X-Received: by 10.66.118.198 with SMTP id ko6mr37196346pab.11.1456139227423; Mon, 22 Feb 2016 03:07:07 -0800 (PST) Received: from localhost ([122.172.89.184]) by smtp.gmail.com with ESMTPSA id n28sm27699116pfa.45.2016.02.22.03.07.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Feb 2016 03:07:06 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] cpufreq: Relocate handle_update() to kill its declaration Date: Mon, 22 Feb 2016 16:36:42 +0530 Message-Id: <366829a89505a358c372bea0c17e58462768b4bb.1456139127.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org handle_update() is declared at the top of the file as its user appear before its definition. Relocate the routine to get rid of this. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) -- 2.7.1.410.g6faf27b -- 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 5ab9c5432113..3689b4dff967 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -121,7 +121,6 @@ static inline bool has_target(void) static int __cpufreq_governor(struct cpufreq_policy *policy, unsigned int event); static unsigned int __cpufreq_get(struct cpufreq_policy *policy); -static void handle_update(struct work_struct *work); /** * Two notifier lists: the "policy" list is involved in the @@ -1023,6 +1022,15 @@ static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy, unsigned int cp return ret; } +static void handle_update(struct work_struct *work) +{ + struct cpufreq_policy *policy = + container_of(work, struct cpufreq_policy, update); + unsigned int cpu = policy->cpu; + pr_debug("handle_update for cpu %u called\n", cpu); + cpufreq_update_policy(cpu); +} + static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu) { struct device *dev = get_cpu_device(cpu); @@ -1404,15 +1412,6 @@ static void cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif) cpufreq_policy_free(policy, true); } -static void handle_update(struct work_struct *work) -{ - struct cpufreq_policy *policy = - container_of(work, struct cpufreq_policy, update); - unsigned int cpu = policy->cpu; - pr_debug("handle_update for cpu %u called\n", cpu); - cpufreq_update_policy(cpu); -} - /** * cpufreq_out_of_sync - If actual and saved CPU frequency differs, we're * in deep trouble.