x86: rename all fields of mpc_table 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
6c65da50 a1d0272a

+41 -42
+10 -10
arch/x86/include/asm/mpspec_def.h
··· 40 40 #define MPC_SIGNATURE "PCMP" 41 41 42 42 struct mpc_table { 43 - char mpc_signature[4]; 44 - unsigned short mpc_length; /* Size of table */ 45 - char mpc_spec; /* 0x01 */ 46 - char mpc_checksum; 47 - char mpc_oem[8]; 48 - char mpc_productid[12]; 49 - unsigned int mpc_oemptr; /* 0 if not present */ 50 - unsigned short mpc_oemsize; /* 0 if not present */ 51 - unsigned short mpc_oemcount; 52 - unsigned int mpc_lapic; /* APIC address */ 43 + char signature[4]; 44 + unsigned short length; /* Size of table */ 45 + char spec; /* 0x01 */ 46 + char checksum; 47 + char oem[8]; 48 + char productid[12]; 49 + unsigned int oemptr; /* 0 if not present */ 50 + unsigned short oemsize; /* 0 if not present */ 51 + unsigned short oemcount; 52 + unsigned int lapic; /* APIC address */ 53 53 unsigned int reserved; 54 54 }; 55 55
+29 -30
arch/x86/kernel/mpparse.c
··· 247 247 static int __init smp_check_mpc(struct mpc_table *mpc, char *oem, char *str) 248 248 { 249 249 250 - if (memcmp(mpc->mpc_signature, MPC_SIGNATURE, 4)) { 250 + if (memcmp(mpc->signature, MPC_SIGNATURE, 4)) { 251 251 printk(KERN_ERR "MPTABLE: bad signature [%c%c%c%c]!\n", 252 - mpc->mpc_signature[0], mpc->mpc_signature[1], 253 - mpc->mpc_signature[2], mpc->mpc_signature[3]); 252 + mpc->signature[0], mpc->signature[1], 253 + mpc->signature[2], mpc->signature[3]); 254 254 return 0; 255 255 } 256 - if (mpf_checksum((unsigned char *)mpc, mpc->mpc_length)) { 256 + if (mpf_checksum((unsigned char *)mpc, mpc->length)) { 257 257 printk(KERN_ERR "MPTABLE: checksum error!\n"); 258 258 return 0; 259 259 } 260 - if (mpc->mpc_spec != 0x01 && mpc->mpc_spec != 0x04) { 260 + if (mpc->spec != 0x01 && mpc->spec != 0x04) { 261 261 printk(KERN_ERR "MPTABLE: bad table version (%d)!!\n", 262 - mpc->mpc_spec); 262 + mpc->spec); 263 263 return 0; 264 264 } 265 - if (!mpc->mpc_lapic) { 265 + if (!mpc->lapic) { 266 266 printk(KERN_ERR "MPTABLE: null local APIC address!\n"); 267 267 return 0; 268 268 } 269 - memcpy(oem, mpc->mpc_oem, 8); 269 + memcpy(oem, mpc->oem, 8); 270 270 oem[8] = 0; 271 271 printk(KERN_INFO "MPTABLE: OEM ID: %s\n", oem); 272 272 273 - memcpy(str, mpc->mpc_productid, 12); 273 + memcpy(str, mpc->productid, 12); 274 274 str[12] = 0; 275 275 276 276 printk(KERN_INFO "MPTABLE: Product ID: %s\n", str); 277 277 278 - printk(KERN_INFO "MPTABLE: APIC at: 0x%X\n", mpc->mpc_lapic); 278 + printk(KERN_INFO "MPTABLE: APIC at: 0x%X\n", mpc->lapic); 279 279 280 280 return 1; 281 281 } ··· 305 305 #endif 306 306 /* save the local APIC address, it might be non-default */ 307 307 if (!acpi_lapic) 308 - mp_lapic_addr = mpc->mpc_lapic; 308 + mp_lapic_addr = mpc->lapic; 309 309 310 310 if (early) 311 311 return 1; 312 312 313 - if (mpc->mpc_oemptr && x86_quirks->smp_read_mpc_oem) { 314 - struct mpc_oemtable *oem_table = (void *)(long)mpc->mpc_oemptr; 315 - x86_quirks->smp_read_mpc_oem(oem_table, mpc->mpc_oemsize); 313 + if (mpc->oemptr && x86_quirks->smp_read_mpc_oem) { 314 + struct mpc_oemtable *oem_table = (void *)(long)mpc->oemptr; 315 + x86_quirks->smp_read_mpc_oem(oem_table, mpc->oemsize); 316 316 } 317 317 318 318 /* ··· 321 321 if (x86_quirks->mpc_record) 322 322 *x86_quirks->mpc_record = 0; 323 323 324 - while (count < mpc->mpc_length) { 324 + while (count < mpc->length) { 325 325 switch (*mpt) { 326 326 case MP_PROCESSOR: 327 327 { ··· 378 378 printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n"); 379 379 printk(KERN_ERR "type %x\n", *mpt); 380 380 print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16, 381 - 1, mpc, mpc->mpc_length, 1); 382 - count = mpc->mpc_length; 381 + 1, mpc, mpc->length, 1); 382 + count = mpc->length; 383 383 break; 384 384 } 385 385 if (x86_quirks->mpc_record) ··· 848 848 int count = sizeof(*mpc); 849 849 unsigned char *mpt = ((unsigned char *)mpc) + count; 850 850 851 - printk(KERN_INFO "mpc_length %x\n", mpc->mpc_length); 852 - while (count < mpc->mpc_length) { 851 + printk(KERN_INFO "mpc_length %x\n", mpc->length); 852 + while (count < mpc->length) { 853 853 switch (*mpt) { 854 854 case MP_PROCESSOR: 855 855 { ··· 912 912 printk(KERN_ERR "Your mptable is wrong, contact your HW vendor!\n"); 913 913 printk(KERN_ERR "type %x\n", *mpt); 914 914 print_hex_dump(KERN_ERR, " ", DUMP_PREFIX_ADDRESS, 16, 915 - 1, mpc, mpc->mpc_length, 1); 915 + 1, mpc, mpc->length, 1); 916 916 goto out; 917 917 } 918 918 } ··· 947 947 } 948 948 } 949 949 assign_to_mpc_intsrc(&mp_irqs[i], m); 950 - mpc->mpc_length = count; 950 + mpc->length = count; 951 951 mpt += sizeof(struct mpc_intsrc); 952 952 } 953 953 print_mp_irq_info(&mp_irqs[i]); ··· 955 955 #endif 956 956 out: 957 957 /* update checksum */ 958 - mpc->mpc_checksum = 0; 959 - mpc->mpc_checksum -= mpf_checksum((unsigned char *)mpc, 960 - mpc->mpc_length); 958 + mpc->checksum = 0; 959 + mpc->checksum -= mpf_checksum((unsigned char *)mpc, mpc->length); 961 960 962 961 return 0; 963 962 } ··· 1028 1029 printk(KERN_INFO "mpf: %lx\n", virt_to_phys(mpf)); 1029 1030 printk(KERN_INFO "mpf_physptr: %x\n", mpf->mpf_physptr); 1030 1031 1031 - if (mpc_new_phys && mpc->mpc_length > mpc_new_length) { 1032 + if (mpc_new_phys && mpc->length > mpc_new_length) { 1032 1033 mpc_new_phys = 0; 1033 1034 printk(KERN_INFO "mpc_new_length is %ld, please use alloc_mptable=8k\n", 1034 1035 mpc_new_length); ··· 1037 1038 if (!mpc_new_phys) { 1038 1039 unsigned char old, new; 1039 1040 /* check if we can change the postion */ 1040 - mpc->mpc_checksum = 0; 1041 - old = mpf_checksum((unsigned char *)mpc, mpc->mpc_length); 1042 - mpc->mpc_checksum = 0xff; 1043 - new = mpf_checksum((unsigned char *)mpc, mpc->mpc_length); 1041 + mpc->checksum = 0; 1042 + old = mpf_checksum((unsigned char *)mpc, mpc->length); 1043 + mpc->checksum = 0xff; 1044 + new = mpf_checksum((unsigned char *)mpc, mpc->length); 1044 1045 if (old == new) { 1045 1046 printk(KERN_INFO "mpc is readonly, please try alloc_mptable instead\n"); 1046 1047 return 0; ··· 1049 1050 } else { 1050 1051 mpf->mpf_physptr = mpc_new_phys; 1051 1052 mpc_new = phys_to_virt(mpc_new_phys); 1052 - memcpy(mpc_new, mpc, mpc->mpc_length); 1053 + memcpy(mpc_new, mpc, mpc->length); 1053 1054 mpc = mpc_new; 1054 1055 /* check if we can modify that */ 1055 1056 if (mpc_new_phys - mpf->mpf_physptr) {
+2 -2
arch/x86/mach-generic/es7000.c
··· 46 46 static __init int 47 47 mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) 48 48 { 49 - if (mpc->mpc_oemptr) { 49 + if (mpc->oemptr) { 50 50 struct mpc_oemtable *oem_table = 51 - (struct mpc_oemtable *)mpc->mpc_oemptr; 51 + (struct mpc_oemtable *)mpc->oemptr; 52 52 if (!strncmp(oem, "UNISYS", 6)) 53 53 return parse_unisys_oem((char *)oem_table); 54 54 }