From patchwork Sat Aug 3 17:13:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18756 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A903823981 for ; Sat, 3 Aug 2013 17:13:47 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id h10sf2341903vbh.1 for ; Sat, 03 Aug 2013 10:13:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to :mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:x-gm-message-state:x-removed-original-auth:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=Zg0TP9IrGxDyqRMfYKFzgogW7HMj51auwcjUoO0J3SU=; b=ejJWw1wR981uflxn0RWIECkrPBa6he9wqAhuoyTpjpgShAaaFgtYaESvyXoAxD1UgU TUrbl7xLjqZiAxMbMeq21SzmjshYGlE0lxsJTlSrPcgZGfv1dSCgsLOuhOz6McQJ/Z3L 8OD1ur7xcvL7m8PLdoJ53oKTVfOSRsnH6w4u6dwa58qpqJ8QB9i49ZoyKNHMq8i4RJJL IRbbpxZCndJ+rfeYk7LtsRgSpL2McWnKx6W7z2oH82fmYpLaihiRsvVc8NCgDADniiK+ VoLFWdhrpCYf1ttCQPyWpMiBPZrWcdOqfN5t1e6HFqy6e0O815vjTVMKmNh1mSU7Hq6J dxqg== X-Received: by 10.236.137.133 with SMTP id y5mr5097700yhi.51.1375550027134; Sat, 03 Aug 2013 10:13:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.122.74 with SMTP id lq10ls2111591qeb.30.gmail; Sat, 03 Aug 2013 10:13:47 -0700 (PDT) X-Received: by 10.58.154.34 with SMTP id vl2mr3767598veb.35.1375550027000; Sat, 03 Aug 2013 10:13:47 -0700 (PDT) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id c13si3207167veu.39.2013.08.03.10.13.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 03 Aug 2013 10:13:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.42; Received: by mail-vb0-f42.google.com with SMTP id e12so1673290vbg.29 for ; Sat, 03 Aug 2013 10:13:46 -0700 (PDT) X-Received: by 10.58.187.4 with SMTP id fo4mr3722414vec.55.1375550026829; Sat, 03 Aug 2013 10:13:46 -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.221.11.8 with SMTP id pc8csp10437vcb; Sat, 3 Aug 2013 10:13:46 -0700 (PDT) X-Received: by 10.182.79.201 with SMTP id l9mr9442144obx.61.1375550025977; Sat, 03 Aug 2013 10:13:45 -0700 (PDT) Received: from mail-oa0-f52.google.com (mail-oa0-f52.google.com [209.85.219.52]) by mx.google.com with ESMTPS id xw9si6957280oeb.26.2013.08.03.10.13.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 03 Aug 2013 10:13:45 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.219.52 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.219.52; Received: by mail-oa0-f52.google.com with SMTP id n12so3455792oag.25 for ; Sat, 03 Aug 2013 10:13:45 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.227.136 with SMTP id sa8mr9340677obc.39.1375550025592; Sat, 03 Aug 2013 10:13:45 -0700 (PDT) Received: by 10.182.28.168 with HTTP; Sat, 3 Aug 2013 10:13:45 -0700 (PDT) In-Reply-To: References: Date: Sat, 3 Aug 2013 22:43:45 +0530 Message-ID: Subject: Re: [PATCH 02/10] cpufreq: Re-arrange declarations in cpufreq.h 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, srivatsa.bhat@linux.vnet.ibm.com, l.majewski@samsung.com, Viresh Kumar X-Gm-Message-State: ALoCoQkb6++Nifd8OUQy6/0o9gznwh5pcYq2C0BHnrm581Ypnk9kGstEAVR0BmHFqswIEt98uXZ0 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.212.42 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: , On 3 August 2013 17:19, Viresh Kumar wrote: > They are pretty much mixed up. Although generic headers are present but > definitions/declarations are present outside them too.. > > This patch just moves stuff up and down to make it look better and consistent. > > Signed-off-by: Viresh Kumar > --- > include/linux/cpufreq.h | 370 +++++++++++++++++++++++------------------------- > 1 file changed, 177 insertions(+), 193 deletions(-) Fixup due to compilation reported by Fengguang's kbuild system: [Will post the series again once I receive more comments on it] * safe) @@ -282,32 +295,16 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mult) { #if BITS_PER_LONG == 32 - u64 result = ((u64) old) * ((u64) mult); do_div(result, div); return (unsigned long) result; #elif BITS_PER_LONG == 64 - unsigned long result = old * ((u64) mult); result /= div; return result; - #endif -}; - -#else /* CONFIG_CPU_FREQ */ -static inline int cpufreq_register_notifier(struct notifier_block *nb, - unsigned int list) -{ - return 0; } -static inline int cpufreq_unregister_notifier(struct notifier_block *nb, - unsigned int list) -{ - return 0; -} -#endif /* !CONFIG_CPU_FREQ */ /********************************************************************* * CPUFREQ GOVERNORS * diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index a6b97e2..d568f39 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -268,6 +268,19 @@ int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); void cpufreq_notify_transition(struct cpufreq_policy *policy, struct cpufreq_freqs *freqs, unsigned int state); +#else /* CONFIG_CPU_FREQ */ +static inline int cpufreq_register_notifier(struct notifier_block *nb, + unsigned int list) +{ + return 0; +} +static inline int cpufreq_unregister_notifier(struct notifier_block *nb, + unsigned int list) +{ + return 0; +} +#endif /* !CONFIG_CPU_FREQ */ + /** * cpufreq_scale - "old * mult / div" calculation for large values (32-bit-arch