Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 219835f1 authored by Paolo Ciarrocchi's avatar Paolo Ciarrocchi Committed by Ingo Molnar
Browse files

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: default avatarPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f016e15c
Loading
Loading
Loading
Loading
+23 −21
Original line number Diff line number Diff line
@@ -26,9 +26,10 @@
#define NFORCE2_SAFE_DISTANCE 50

/* Delay in ms between FSB changes */
//#define NFORCE2_DELAY 10
/* #define NFORCE2_DELAY 10 */

/* nforce2_chipset:
/*
 * nforce2_chipset:
 * FSB is changed using the chipset
 */
static struct pci_dev *nforce2_chipset_dev;
@@ -36,13 +37,13 @@ static struct pci_dev *nforce2_chipset_dev;
/* fid:
 * multiplier * 10
 */
static int fid = 0;
static int fid;

/* min_fsb, max_fsb:
 * minimum and maximum FSB (= FSB at boot time)
 */
static int min_fsb = 0;
static int max_fsb = 0;
static int min_fsb;
static int max_fsb;

MODULE_AUTHOR("Sebastian Witt <se.witt@gmx.net>");
MODULE_DESCRIPTION("nForce2 FSB changing cpufreq driver");
@@ -210,7 +211,8 @@ static int nforce2_set_fsb(unsigned int fsb)
			tfsb--;

		/* Calculate the PLL reg. value */
		if ((pll = nforce2_calc_pll(tfsb)) == -1)
		pll = nforce2_calc_pll(tfsb);
		if (pll == -1)
			return -EINVAL;

		nforce2_write_pll(pll);
@@ -249,7 +251,7 @@ static unsigned int nforce2_get(unsigned int cpu)
static int nforce2_target(struct cpufreq_policy *policy,
			  unsigned int target_freq, unsigned int relation)
{
//        unsigned long         flags;
/*        unsigned long         flags; */
	struct cpufreq_freqs freqs;
	unsigned int target_fsb;

@@ -271,7 +273,7 @@ static int nforce2_target(struct cpufreq_policy *policy,
	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);

	/* Disable IRQs */
	//local_irq_save(flags);
	/* local_irq_save(flags); */

	if (nforce2_set_fsb(target_fsb) < 0)
		printk(KERN_ERR "cpufreq: Changing FSB to %d failed\n",
@@ -281,7 +283,7 @@ static int nforce2_target(struct cpufreq_policy *policy,
			target_fsb);

	/* Enable IRQs */
	//local_irq_restore(flags);
	/* local_irq_restore(flags); */

	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);