From: Borislav Petkov <bp@alien8.de>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
"André Przywara" <andre@andrep.de>,
"Leonid Isaev" <lisaev@umail.iu.edu>,
"Tom Gundersen" <teg@jklm.no>,
cpufreq@vger.kernel.org, linux-acpi@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
"Borislav Petkov" <bp@suse.de>
Subject: Re: [PATCH 4/6] cpufreq: Add a get_current_driver helper
Date: Mon, 28 Jan 2013 10:49:57 +0100 [thread overview]
Message-ID: <20130128094957.GA6109@pd.tnic> (raw)
In-Reply-To: <CAOh2x==qf057z2vmADd6+thaXXVxEh1GZO-sKHRDyosqTfMdng@mail.gmail.com>
On Mon, Jan 28, 2013 at 10:07:10AM +0530, Viresh Kumar wrote:
> Two minor things here:
> - You placed the routine at bad place. This place is meant for
> freq_table helpers.
Which one would you suggest: CPUFREQ DRIVER INTERFACE?
Btw, this function type splitting looks kinda silly to me. In that same
section there are two which clearly don't belong there:
struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
void cpufreq_cpu_put(struct cpufreq_policy *data);
since they don't have anything to do with freq_table. And since they
return cpufreq_policy, they should be maybe called:
cpufreq_get_cpu_policy
cpufreq_put_cpu_policy
or something more expressive, pertaining to what they actually do. But
they actually get/put the module (inc/dec the module's refcount) *and*
return the cpufreq_policy... whatever, I don't care that much so see
below.
> - And you really don't need extern for function prototypes.
Yeah, Rafael corrected that when committing:
http://git.kernel.org/?p=linux/kernel/git/rafael/linux-pm.git;a=commitdiff;h=fcbf43dcacb0daecffca0f5c862c9d8815108e58
--
From 830eb9ebc715d329229772d11332c50dfd1d9330 Mon Sep 17 00:00:00 2001
From: Borislav Petkov <bp@suse.de>
Date: Mon, 28 Jan 2013 10:38:33 +0100
Subject: [PATCH] cpufreq: Sort function prototypes properly
Move function prototypes to a place where they logically fit better.
Signed-off-by: Borislav Petkov <bp@suse.de>
---
include/linux/cpufreq.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index a018da2d2a7c..f33ace57adb6 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -308,6 +308,9 @@ __ATTR(_name, 0444, show_##_name, NULL)
static struct global_attr _name = \
__ATTR(_name, 0644, show_##_name, store_##_name)
+struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
+void cpufreq_cpu_put(struct cpufreq_policy *data);
+const char *cpufreq_get_current_driver(void);
/*********************************************************************
* CPUFREQ 2.6. INTERFACE *
@@ -397,8 +400,6 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
/* the following 3 funtions are for cpufreq core use only */
struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu);
-struct cpufreq_policy *cpufreq_cpu_get(unsigned int cpu);
-void cpufreq_cpu_put(struct cpufreq_policy *data);
/* the following are really really optional */
extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
@@ -407,5 +408,4 @@ void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table,
unsigned int cpu);
void cpufreq_frequency_table_put_attr(unsigned int cpu);
-extern const char *cpufreq_get_current_driver(void);
#endif /* _LINUX_CPUFREQ_H */
--
1.8.1.rc3
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2013-01-28 9:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-20 10:24 [PATCH 0/6] acpi-cpufreq and powernow-k8 fixes Borislav Petkov
2013-01-20 10:24 ` [PATCH 1/6] powernow-k8: Add a kconfig dependency on acpi-cpufreq Borislav Petkov
2013-01-20 10:24 ` [PATCH 2/6] acpi-cpufreq: Do not load on K8 Borislav Petkov
2013-01-20 10:24 ` [PATCH 3/6] cpufreq: Make acpi-cpufreq link first Borislav Petkov
2013-01-20 10:24 ` [PATCH 4/6] cpufreq: Add a get_current_driver helper Borislav Petkov
2013-01-28 4:37 ` Viresh Kumar
2013-01-28 9:49 ` Borislav Petkov [this message]
2013-01-28 9:52 ` Viresh Kumar
2013-01-20 10:24 ` [PATCH 5/6] powernow-k8: Cleanup module request Borislav Petkov
2013-01-20 10:24 ` [PATCH 6/6] powernow-k8: Cleanup init function Borislav Petkov
2013-01-20 14:18 ` [PATCH 0/6] acpi-cpufreq and powernow-k8 fixes Rafael J. Wysocki
2013-01-21 0:04 ` Borislav Petkov
2013-01-21 0:13 ` Rafael J. Wysocki
2013-01-22 14:00 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130128094957.GA6109@pd.tnic \
--to=bp@alien8.de \
--cc=andre@andrep.de \
--cc=bp@suse.de \
--cc=cpufreq@vger.kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lisaev@umail.iu.edu \
--cc=rjw@sisk.pl \
--cc=teg@jklm.no \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox