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

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

x86: coding style fixes to arch/x86/kernel/io_apic_32.c



Before:
total: 91 errors, 73 warnings, 2850 lines checked

After:
total: 1 errors, 47 warnings, 2848 lines checked

Compile tested:

paolo@paolo-desktop:/tmp$ size io*
   text    data     bss     dec     hex filename
  13836    1756   11104   26696    6848 io_apic_32.o.after
  13836    1756   11104   26696    6848 io_apic_32.o.before

Signed-off-by: default avatarPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 46b3b4ef
Loading
Loading
Loading
Loading
+173 −175
Original line number Diff line number Diff line
@@ -438,10 +438,9 @@ static inline void balance_irq(int cpu, int irq)

	cpus_and(allowed_mask, cpu_online_map, balance_irq_affinity[irq]);
	new_cpu = move(cpu, allowed_mask, now, 1);
	if (cpu != new_cpu) {
	if (cpu != new_cpu)
		set_pending_irq(irq, cpumask_of_cpu(new_cpu));
}
}

static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold)
{
@@ -529,7 +528,8 @@ static void do_irq_balance(void)
	max_cpu_irq = ULONG_MAX;

tryanothercpu:
	/* Look for heaviest loaded processor.
	/*
	 * Look for heaviest loaded processor.
	 * We may come back to get the next heaviest loaded processor.
	 * Skip processors with trivial loads.
	 */
@@ -547,7 +547,8 @@ static void do_irq_balance(void)
	}

	if (tmp_loaded == -1) {
 	 /* In the case of small number of heavy interrupt sources, 
	 /*
	  * In the case of small number of heavy interrupt sources,
	  * loading some of the cpus too much. We use Ingo's original
	  * approach to rotate them around.
	  */
@@ -563,7 +564,8 @@ static void do_irq_balance(void)
	max_loaded = tmp_loaded;	/* processor */
	imbalance = (max_cpu_irq - min_cpu_irq) / 2;

	/* if imbalance is less than approx 10% of max load, then
	/*
	 * if imbalance is less than approx 10% of max load, then
	 * observe diminishing returns action. - quit
	 */
	if (imbalance < (max_cpu_irq >> 3))
@@ -589,9 +591,8 @@ static void do_irq_balance(void)
			selected_irq = j;
		}
	}
	if (selected_irq == -1) {
	if (selected_irq == -1)
		goto tryanothercpu;
	}

	imbalance = move_this_load;

@@ -977,8 +978,7 @@ static int MPBIOS_polarity(int idx)
	/*
	 * Determine IRQ line polarity (high active or low active):
	 */
	switch (mp_irqs[idx].mpc_irqflag & 3)
	{
	switch (mp_irqs[idx].mpc_irqflag & 3) {
	case 0: /* conforms, ie. bus-type dependent polarity */
	{
		polarity = test_bit(bus, mp_bus_not_pci)?
@@ -1020,16 +1020,14 @@ static int MPBIOS_trigger(int idx)
	/*
	 * Determine IRQ trigger mode (edge or level sensitive):
	 */
	switch ((mp_irqs[idx].mpc_irqflag>>2) & 3)
	{
	switch ((mp_irqs[idx].mpc_irqflag>>2) & 3) {
	case 0: /* conforms, ie. bus-type dependent */
	{
		trigger = test_bit(bus, mp_bus_not_pci)?
				default_ISA_trigger(idx):
				default_PCI_trigger(idx);
#if defined(CONFIG_EISA) || defined(CONFIG_MCA)
			switch (mp_bus_id_to_type[bus])
			{
		switch (mp_bus_id_to_type[bus]) {
		case MP_BUS_ISA: /* ISA pin */
		{
			/* set before the switch */
@@ -1166,7 +1164,7 @@ static u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 }

static int __assign_irq_vector(int irq)
{
	static int current_vector = FIRST_DEVICE_VECTOR, current_offset = 0;
	static int current_vector = FIRST_DEVICE_VECTOR, current_offset;
	int vector, offset;

	BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);