x86: rename all fields of mpc_intsrc mpc_X to X

Impact: cleanup, solve 80 columns wrap problems

It would be cleaner to rename all the mpc->mpc_X fields to
mpc->X - that alone would give 4 characters per usage site.
(we already know that it's an 'mpc' entity -
no need to duplicate that in the field too)

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Jaswinder Singh Rajput and committed by
Ingo Molnar
e253b396 b5ced7cd

+46 -47
+7 -7
arch/x86/include/asm/mpspec_def.h
··· 117 }; 118 119 struct mpc_intsrc { 120 - unsigned char mpc_type; 121 - unsigned char mpc_irqtype; 122 - unsigned short mpc_irqflag; 123 - unsigned char mpc_srcbus; 124 - unsigned char mpc_srcbusirq; 125 - unsigned char mpc_dstapic; 126 - unsigned char mpc_dstirq; 127 }; 128 129 enum mp_irq_source_types {
··· 117 }; 118 119 struct mpc_intsrc { 120 + unsigned char type; 121 + unsigned char irqtype; 122 + unsigned short irqflag; 123 + unsigned char srcbus; 124 + unsigned char srcbusirq; 125 + unsigned char dstapic; 126 + unsigned char dstirq; 127 }; 128 129 enum mp_irq_source_types {
+39 -40
arch/x86/kernel/mpparse.c
··· 156 { 157 apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x," 158 " IRQ %02x, APIC ID %x, APIC INT %02x\n", 159 - m->mpc_irqtype, m->mpc_irqflag & 3, 160 - (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus, 161 - m->mpc_srcbusirq, m->mpc_dstapic, m->mpc_dstirq); 162 } 163 164 static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq) ··· 172 static void __init assign_to_mp_irq(struct mpc_intsrc *m, 173 struct mp_config_intsrc *mp_irq) 174 { 175 - mp_irq->mp_dstapic = m->mpc_dstapic; 176 - mp_irq->mp_type = m->mpc_type; 177 - mp_irq->mp_irqtype = m->mpc_irqtype; 178 - mp_irq->mp_irqflag = m->mpc_irqflag; 179 - mp_irq->mp_srcbus = m->mpc_srcbus; 180 - mp_irq->mp_srcbusirq = m->mpc_srcbusirq; 181 - mp_irq->mp_dstirq = m->mpc_dstirq; 182 } 183 184 static void __init assign_to_mpc_intsrc(struct mp_config_intsrc *mp_irq, 185 struct mpc_intsrc *m) 186 { 187 - m->mpc_dstapic = mp_irq->mp_dstapic; 188 - m->mpc_type = mp_irq->mp_type; 189 - m->mpc_irqtype = mp_irq->mp_irqtype; 190 - m->mpc_irqflag = mp_irq->mp_irqflag; 191 - m->mpc_srcbus = mp_irq->mp_srcbus; 192 - m->mpc_srcbusirq = mp_irq->mp_srcbusirq; 193 - m->mpc_dstirq = mp_irq->mp_dstirq; 194 } 195 196 static int __init mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq, 197 struct mpc_intsrc *m) 198 { 199 - if (mp_irq->mp_dstapic != m->mpc_dstapic) 200 return 1; 201 - if (mp_irq->mp_type != m->mpc_type) 202 return 2; 203 - if (mp_irq->mp_irqtype != m->mpc_irqtype) 204 return 3; 205 - if (mp_irq->mp_irqflag != m->mpc_irqflag) 206 return 4; 207 - if (mp_irq->mp_srcbus != m->mpc_srcbus) 208 return 5; 209 - if (mp_irq->mp_srcbusirq != m->mpc_srcbusirq) 210 return 6; 211 - if (mp_irq->mp_dstirq != m->mpc_dstirq) 212 return 7; 213 214 return 0; ··· 414 int i; 415 int ELCR_fallback = 0; 416 417 - intsrc.mpc_type = MP_INTSRC; 418 - intsrc.mpc_irqflag = 0; /* conforming */ 419 - intsrc.mpc_srcbus = 0; 420 - intsrc.mpc_dstapic = mp_ioapics[0].mp_apicid; 421 422 - intsrc.mpc_irqtype = mp_INT; 423 424 /* 425 * If true, we have an ISA/PCI system with no IRQ entries ··· 462 * irqflag field (level sensitive, active high polarity). 463 */ 464 if (ELCR_trigger(i)) 465 - intsrc.mpc_irqflag = 13; 466 else 467 - intsrc.mpc_irqflag = 0; 468 } 469 470 - intsrc.mpc_srcbusirq = i; 471 - intsrc.mpc_dstirq = i ? i : 2; /* IRQ0 to INTIN2 */ 472 MP_intsrc_info(&intsrc); 473 } 474 475 - intsrc.mpc_irqtype = mp_ExtINT; 476 - intsrc.mpc_srcbusirq = 0; 477 - intsrc.mpc_dstirq = 0; /* 8259A to INTIN0 */ 478 MP_intsrc_info(&intsrc); 479 } 480 ··· 800 { 801 int i; 802 803 - if (m->mpc_irqtype != mp_INT) 804 return 0; 805 806 - if (m->mpc_irqflag != 0x0f) 807 return 0; 808 809 /* not legacy */ ··· 815 if (mp_irqs[i].mp_irqflag != 0x0f) 816 continue; 817 818 - if (mp_irqs[i].mp_srcbus != m->mpc_srcbus) 819 continue; 820 - if (mp_irqs[i].mp_srcbusirq != m->mpc_srcbusirq) 821 continue; 822 if (irq_used[i]) { 823 /* already claimed */
··· 156 { 157 apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x," 158 " IRQ %02x, APIC ID %x, APIC INT %02x\n", 159 + m->irqtype, m->irqflag & 3, (m->irqflag >> 2) & 3, m->srcbus, 160 + m->srcbusirq, m->dstapic, m->dstirq); 161 } 162 163 static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq) ··· 173 static void __init assign_to_mp_irq(struct mpc_intsrc *m, 174 struct mp_config_intsrc *mp_irq) 175 { 176 + mp_irq->mp_dstapic = m->dstapic; 177 + mp_irq->mp_type = m->type; 178 + mp_irq->mp_irqtype = m->irqtype; 179 + mp_irq->mp_irqflag = m->irqflag; 180 + mp_irq->mp_srcbus = m->srcbus; 181 + mp_irq->mp_srcbusirq = m->srcbusirq; 182 + mp_irq->mp_dstirq = m->dstirq; 183 } 184 185 static void __init assign_to_mpc_intsrc(struct mp_config_intsrc *mp_irq, 186 struct mpc_intsrc *m) 187 { 188 + m->dstapic = mp_irq->mp_dstapic; 189 + m->type = mp_irq->mp_type; 190 + m->irqtype = mp_irq->mp_irqtype; 191 + m->irqflag = mp_irq->mp_irqflag; 192 + m->srcbus = mp_irq->mp_srcbus; 193 + m->srcbusirq = mp_irq->mp_srcbusirq; 194 + m->dstirq = mp_irq->mp_dstirq; 195 } 196 197 static int __init mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq, 198 struct mpc_intsrc *m) 199 { 200 + if (mp_irq->mp_dstapic != m->dstapic) 201 return 1; 202 + if (mp_irq->mp_type != m->type) 203 return 2; 204 + if (mp_irq->mp_irqtype != m->irqtype) 205 return 3; 206 + if (mp_irq->mp_irqflag != m->irqflag) 207 return 4; 208 + if (mp_irq->mp_srcbus != m->srcbus) 209 return 5; 210 + if (mp_irq->mp_srcbusirq != m->srcbusirq) 211 return 6; 212 + if (mp_irq->mp_dstirq != m->dstirq) 213 return 7; 214 215 return 0; ··· 415 int i; 416 int ELCR_fallback = 0; 417 418 + intsrc.type = MP_INTSRC; 419 + intsrc.irqflag = 0; /* conforming */ 420 + intsrc.srcbus = 0; 421 + intsrc.dstapic = mp_ioapics[0].mp_apicid; 422 423 + intsrc.irqtype = mp_INT; 424 425 /* 426 * If true, we have an ISA/PCI system with no IRQ entries ··· 463 * irqflag field (level sensitive, active high polarity). 464 */ 465 if (ELCR_trigger(i)) 466 + intsrc.irqflag = 13; 467 else 468 + intsrc.irqflag = 0; 469 } 470 471 + intsrc.srcbusirq = i; 472 + intsrc.dstirq = i ? i : 2; /* IRQ0 to INTIN2 */ 473 MP_intsrc_info(&intsrc); 474 } 475 476 + intsrc.irqtype = mp_ExtINT; 477 + intsrc.srcbusirq = 0; 478 + intsrc.dstirq = 0; /* 8259A to INTIN0 */ 479 MP_intsrc_info(&intsrc); 480 } 481 ··· 801 { 802 int i; 803 804 + if (m->irqtype != mp_INT) 805 return 0; 806 807 + if (m->irqflag != 0x0f) 808 return 0; 809 810 /* not legacy */ ··· 816 if (mp_irqs[i].mp_irqflag != 0x0f) 817 continue; 818 819 + if (mp_irqs[i].mp_srcbus != m->srcbus) 820 continue; 821 + if (mp_irqs[i].mp_srcbusirq != m->srcbusirq) 822 continue; 823 if (irq_used[i]) { 824 /* already claimed */