* [PATCH] x86: Coding style fixes to arch/x86/kernel/cpu/cpufreq/powernow-k6.c
@ 2008-07-28 19:08 Paolo Ciarrocchi
2008-07-28 20:50 ` Dave Jones
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Ciarrocchi @ 2008-07-28 19:08 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Linux Kernel, tglx, hpa
Ciao Ingo, all,
Before:
total: 11 errors, 15 warnings, 255 lines checked
After:
total: 0 errors, 6 warnings, 254 lines checked
paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/powernow-k6.o.*
476932f5e1ffe365db9d1dfb3f860369 /tmp/powernow-k6.o.after
476932f5e1ffe365db9d1dfb3f860369 /tmp/powernow-k6.o.before
Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
---
arch/x86/kernel/cpu/cpufreq/powernow-k6.c | 41 ++++++++++++++---------------
1 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c
index eb9b62b..b5ced80 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c
@@ -15,12 +15,11 @@
#include <linux/slab.h>
#include <asm/msr.h>
-#include <asm/timex.h>
-#include <asm/io.h>
+#include <linux/timex.h>
+#include <linux/io.h>
-
-#define POWERNOW_IOPORT 0xfff0 /* it doesn't matter where, as long
- as it is unused */
+#define POWERNOW_IOPORT 0xfff0 /* it doesn't matter where, as long
+ as it is unused */
static unsigned int busfreq; /* FSB, in 10 kHz */
static unsigned int max_multiplier;
@@ -53,7 +52,7 @@ static int powernow_k6_get_cpu_multiplier(void)
msrval = POWERNOW_IOPORT + 0x1;
wrmsr(MSR_K6_EPMR, msrval, 0); /* enable the PowerNow port */
- invalue=inl(POWERNOW_IOPORT + 0x8);
+ invalue = inl(POWERNOW_IOPORT + 0x8);
msrval = POWERNOW_IOPORT + 0x0;
wrmsr(MSR_K6_EPMR, msrval, 0); /* disable it again */
@@ -67,9 +66,9 @@ static int powernow_k6_get_cpu_multiplier(void)
*
* Tries to change the PowerNow! multiplier
*/
-static void powernow_k6_set_state (unsigned int best_i)
+static void powernow_k6_set_state(unsigned int best_i)
{
- unsigned long outvalue=0, invalue=0;
+ unsigned long outvalue = 0, invalue = 0;
unsigned long msrval;
struct cpufreq_freqs freqs;
@@ -90,10 +89,10 @@ static void powernow_k6_set_state (unsigned int best_i)
msrval = POWERNOW_IOPORT + 0x1;
wrmsr(MSR_K6_EPMR, msrval, 0); /* enable the PowerNow port */
- invalue=inl(POWERNOW_IOPORT + 0x8);
+ invalue = inl(POWERNOW_IOPORT + 0x8);
invalue = invalue & 0xf;
outvalue = outvalue | invalue;
- outl(outvalue ,(POWERNOW_IOPORT + 0x8));
+ outl(outvalue , (POWERNOW_IOPORT + 0x8));
msrval = POWERNOW_IOPORT + 0x0;
wrmsr(MSR_K6_EPMR, msrval, 0); /* disable it again */
@@ -124,7 +123,7 @@ static int powernow_k6_verify(struct cpufreq_policy *policy)
*
* sets a new CPUFreq policy
*/
-static int powernow_k6_target (struct cpufreq_policy *policy,
+static int powernow_k6_target(struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
{
@@ -152,7 +151,7 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy)
busfreq = cpu_khz / max_multiplier;
/* table init */
- for (i=0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) {
+ for (i = 0; (clock_ratio[i].frequency != CPUFREQ_TABLE_END); i++) {
if (clock_ratio[i].index > max_multiplier)
clock_ratio[i].frequency = CPUFREQ_ENTRY_INVALID;
else
@@ -165,7 +164,7 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy)
result = cpufreq_frequency_table_cpuinfo(policy, clock_ratio);
if (result)
- return (result);
+ return result;
cpufreq_frequency_table_get_attr(clock_ratio, policy->cpu);
@@ -176,8 +175,8 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy)
static int powernow_k6_cpu_exit(struct cpufreq_policy *policy)
{
unsigned int i;
- for (i=0; i<8; i++) {
- if (i==max_multiplier)
+ for (i = 0; i < 8; i++) {
+ if (i == max_multiplier)
powernow_k6_set_state(i);
}
cpufreq_frequency_table_put_attr(policy->cpu);
@@ -189,7 +188,7 @@ static unsigned int powernow_k6_get(unsigned int cpu)
return busfreq * powernow_k6_get_cpu_multiplier();
}
-static struct freq_attr* powernow_k6_attr[] = {
+static struct freq_attr *powernow_k6_attr[] = {
&cpufreq_freq_attr_scaling_available_freqs,
NULL,
};
@@ -227,7 +226,7 @@ static int __init powernow_k6_init(void)
}
if (cpufreq_register_driver(&powernow_k6_driver)) {
- release_region (POWERNOW_IOPORT, 16);
+ release_region(POWERNOW_IOPORT, 16);
return -EINVAL;
}
@@ -243,13 +242,13 @@ static int __init powernow_k6_init(void)
static void __exit powernow_k6_exit(void)
{
cpufreq_unregister_driver(&powernow_k6_driver);
- release_region (POWERNOW_IOPORT, 16);
+ release_region(POWERNOW_IOPORT, 16);
}
-MODULE_AUTHOR ("Arjan van de Ven <arjanv@redhat.com>, Dave Jones <davej@codemonkey.org.uk>, Dominik Brodowski <linux@brodo.de>");
-MODULE_DESCRIPTION ("PowerNow! driver for AMD K6-2+ / K6-3+ processors.");
-MODULE_LICENSE ("GPL");
+MODULE_AUTHOR("Arjan van de Ven <arjanv@redhat.com>, Dave Jones <davej@codemonkey.org.uk>, Dominik Brodowski <linux@brodo.de>");
+MODULE_DESCRIPTION("PowerNow! driver for AMD K6-2+ / K6-3+ processors.");
+MODULE_LICENSE("GPL");
module_init(powernow_k6_init);
module_exit(powernow_k6_exit);
--
1.5.6.rc1.21.g03300
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: Coding style fixes to arch/x86/kernel/cpu/cpufreq/powernow-k6.c
2008-07-28 19:08 [PATCH] x86: Coding style fixes to arch/x86/kernel/cpu/cpufreq/powernow-k6.c Paolo Ciarrocchi
@ 2008-07-28 20:50 ` Dave Jones
2008-07-28 21:49 ` Paolo Ciarrocchi
0 siblings, 1 reply; 3+ messages in thread
From: Dave Jones @ 2008-07-28 20:50 UTC (permalink / raw)
To: Paolo Ciarrocchi; +Cc: Ingo Molnar, Linux Kernel, tglx, hpa, Arjan van de Ven
On Mon, Jul 28, 2008 at 09:08:16PM +0200, Paolo Ciarrocchi wrote:
> Ciao Ingo, all,
>
> Before:
> total: 11 errors, 15 warnings, 255 lines checked
>
> After:
> total: 0 errors, 6 warnings, 254 lines checked
>
> paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/powernow-k6.o.*
> 476932f5e1ffe365db9d1dfb3f860369 /tmp/powernow-k6.o.after
> 476932f5e1ffe365db9d1dfb3f860369 /tmp/powernow-k6.o.before
>
> Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
I'll queue this up in cpufreq.git
> -MODULE_AUTHOR ("Arjan van de Ven <arjanv@redhat.com>, Dave Jones <davej@codemonkey.org.uk>, Dominik Brodowski <linux@brodo.de>");
> -MODULE_DESCRIPTION ("PowerNow! driver for AMD K6-2+ / K6-3+ processors.");
> -MODULE_LICENSE ("GPL");
> +MODULE_AUTHOR("Arjan van de Ven <arjanv@redhat.com>, Dave Jones <davej@codemonkey.org.uk>, Dominik Brodowski <linux@brodo.de>");
> +MODULE_DESCRIPTION("PowerNow! driver for AMD K6-2+ / K6-3+ processors.");
> +MODULE_LICENSE("GPL");
Incidentally, arjanv@redhat hasn't been correct in a while.
Arjan, which preferred address do you want this changed to?
xircom_cb.c is also in need of a similar change.
(There are other instances of your old address, but those are the
only user-visible ones)
Dave
--
http://www.codemonkey.org.uk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86: Coding style fixes to arch/x86/kernel/cpu/cpufreq/powernow-k6.c
2008-07-28 20:50 ` Dave Jones
@ 2008-07-28 21:49 ` Paolo Ciarrocchi
0 siblings, 0 replies; 3+ messages in thread
From: Paolo Ciarrocchi @ 2008-07-28 21:49 UTC (permalink / raw)
To: Dave Jones, Paolo Ciarrocchi, Ingo Molnar, Linux Kernel, tglx,
hpa, Arjan van de Ven
On 7/28/08, Dave Jones <davej@redhat.com> wrote:
> > Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
>
> I'll queue this up in cpufreq.git
thank you Dave and apologize for not sending you directly the patch.
you might want to look at the other patch i sent a few hours ago, subject was:
Subject: [PATCH] x86: Coding style fixes to
arch/x86/kernel/cpu/cpufreq/elanfreq.c
ciao,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-28 21:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-28 19:08 [PATCH] x86: Coding style fixes to arch/x86/kernel/cpu/cpufreq/powernow-k6.c Paolo Ciarrocchi
2008-07-28 20:50 ` Dave Jones
2008-07-28 21:49 ` Paolo Ciarrocchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).