x86: coding style fixes to x86/kernel/cpu/cpufreq/cpufreq-nforce2.c
Before: total: 22 errors, 8 warnings, 440 lines checked After: total: 0 errors, 8 warnings, 442 lines checked paolo@paolo-desktop:~/linux.trees.git$ md5sum /tmp/cpufreq-nforce2.o.* 3d4330a5d188fe904446e5948a618b48 /tmp/cpufreq-nforce2.o.after 1477e6b0dcd6f59b1fb6b4490042eca6 /tmp/cpufreq-nforce2.o.before ^^^ I guess this is because I fixed a few "do not initialise statics to 0 or NULL" paolo@paolo-desktop:~/linux.trees.git$ size /tmp/cpufreq-nforce2.o.* text data bss dec hex filename 1923 72 16 2011 7db /tmp/cpufreq-nforce2.o.after 1923 72 16 2011 7db /tmp/cpufreq-nforce2.o.before Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
f016e15c11
commit
219835f10e
|
@ -26,9 +26,10 @@
|
||||||
#define NFORCE2_SAFE_DISTANCE 50
|
#define NFORCE2_SAFE_DISTANCE 50
|
||||||
|
|
||||||
/* Delay in ms between FSB changes */
|
/* Delay in ms between FSB changes */
|
||||||
//#define NFORCE2_DELAY 10
|
/* #define NFORCE2_DELAY 10 */
|
||||||
|
|
||||||
/* nforce2_chipset:
|
/*
|
||||||
|
* nforce2_chipset:
|
||||||
* FSB is changed using the chipset
|
* FSB is changed using the chipset
|
||||||
*/
|
*/
|
||||||
static struct pci_dev *nforce2_chipset_dev;
|
static struct pci_dev *nforce2_chipset_dev;
|
||||||
|
@ -36,13 +37,13 @@ static struct pci_dev *nforce2_chipset_dev;
|
||||||
/* fid:
|
/* fid:
|
||||||
* multiplier * 10
|
* multiplier * 10
|
||||||
*/
|
*/
|
||||||
static int fid = 0;
|
static int fid;
|
||||||
|
|
||||||
/* min_fsb, max_fsb:
|
/* min_fsb, max_fsb:
|
||||||
* minimum and maximum FSB (= FSB at boot time)
|
* minimum and maximum FSB (= FSB at boot time)
|
||||||
*/
|
*/
|
||||||
static int min_fsb = 0;
|
static int min_fsb;
|
||||||
static int max_fsb = 0;
|
static int max_fsb;
|
||||||
|
|
||||||
MODULE_AUTHOR("Sebastian Witt <se.witt@gmx.net>");
|
MODULE_AUTHOR("Sebastian Witt <se.witt@gmx.net>");
|
||||||
MODULE_DESCRIPTION("nForce2 FSB changing cpufreq driver");
|
MODULE_DESCRIPTION("nForce2 FSB changing cpufreq driver");
|
||||||
|
@ -210,7 +211,8 @@ static int nforce2_set_fsb(unsigned int fsb)
|
||||||
tfsb--;
|
tfsb--;
|
||||||
|
|
||||||
/* Calculate the PLL reg. value */
|
/* Calculate the PLL reg. value */
|
||||||
if ((pll = nforce2_calc_pll(tfsb)) == -1)
|
pll = nforce2_calc_pll(tfsb);
|
||||||
|
if (pll == -1)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
nforce2_write_pll(pll);
|
nforce2_write_pll(pll);
|
||||||
|
@ -249,7 +251,7 @@ static unsigned int nforce2_get(unsigned int cpu)
|
||||||
static int nforce2_target(struct cpufreq_policy *policy,
|
static int nforce2_target(struct cpufreq_policy *policy,
|
||||||
unsigned int target_freq, unsigned int relation)
|
unsigned int target_freq, unsigned int relation)
|
||||||
{
|
{
|
||||||
// unsigned long flags;
|
/* unsigned long flags; */
|
||||||
struct cpufreq_freqs freqs;
|
struct cpufreq_freqs freqs;
|
||||||
unsigned int target_fsb;
|
unsigned int target_fsb;
|
||||||
|
|
||||||
|
@ -271,7 +273,7 @@ static int nforce2_target(struct cpufreq_policy *policy,
|
||||||
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
|
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
|
||||||
|
|
||||||
/* Disable IRQs */
|
/* Disable IRQs */
|
||||||
//local_irq_save(flags);
|
/* local_irq_save(flags); */
|
||||||
|
|
||||||
if (nforce2_set_fsb(target_fsb) < 0)
|
if (nforce2_set_fsb(target_fsb) < 0)
|
||||||
printk(KERN_ERR "cpufreq: Changing FSB to %d failed\n",
|
printk(KERN_ERR "cpufreq: Changing FSB to %d failed\n",
|
||||||
|
@ -281,7 +283,7 @@ static int nforce2_target(struct cpufreq_policy *policy,
|
||||||
target_fsb);
|
target_fsb);
|
||||||
|
|
||||||
/* Enable IRQs */
|
/* Enable IRQs */
|
||||||
//local_irq_restore(flags);
|
/* local_irq_restore(flags); */
|
||||||
|
|
||||||
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
|
cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue