x86: rename all fields of mpc_table mpc_X to X
PATCH 7/7 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)
--- arch/x86/include/asm/mpspec_def.h | 20 ++++++------ arch/x86/kernel/mpparse.c | 59 ++++++++++++++++++------------------- arch/x86/mach-generic/es7000.c | 4 +- 3 files changed, 41 insertions(+), 42 deletions(-)
arch/x86/include/asm/mpspec_def.h +10 -10
@@ -40,16 +40,16 @@ struct intel_mp_floating {#define MPC_SIGNATURE "PCMP"struct mpc_table { -char mpc_signature[4 ]; -unsigned short mpc_length;/* Size of table */ -char mpc_spec;/* 0x01 */ -char mpc_checksum; -char mpc_oem[8 ]; -char mpc_productid[12 ]; -unsigned int mpc_oemptr;/* 0 if not present */ -unsigned short mpc_oemsize;/* 0 if not present */ -unsigned short mpc_oemcount; -unsigned int mpc_lapic;/* APIC address */ +char signature[4 ]; +unsigned short length;/* Size of table */ +char spec;/* 0x01 */ +char checksum; +char oem[8 ]; +char productid[12 ]; +unsigned int oemptr;/* 0 if not present */ +unsigned short oemsize;/* 0 if not present */ +unsigned short oemcount; +unsigned int lapic;/* APIC address */ unsigned int reserved; };
arch/x86/kernel/mpparse.c +29 -30
148 lines not on this page · raw message
arch/x86/mach-generic/es7000.c +2 -2
@@ -46,9 +46,9 @@ static void __init enable_apic_mode(void)static __init int mps_oem_check (struct mpc_table *mpc,char *oem,char *productid) { -if (mpc->mpc_oemptr) { +if (mpc-oemptr) {struct mpc_oemtable *oem_table = - (struct mpc_oemtable *)mpc->mpc_oemptr; + (struct mpc_oemtable *)mpc->oemptr;if (!strncmp (oem,"UNISYS" ,6 ))return parse_unisys_oem ((char *)oem_table); }
Signature · 1 line
1.5.5.1
Review
Quoted 5 lines · Jaswinder Singh Rajput
mps_oem_check(struct mpc_table *mpc, char *oem, char *productid){(quoted diff) +1
-1- if (mpc->mpc_oemptr) { + if (mpc-oemptr) { struct mpc_oemtable *oem_table =
It seems that I need some sleep, Here is correct one:
Subject: [PATCH -tip 7/7] 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)
--- arch/x86/include/asm/mpspec_def.h | 20 ++++++------ arch/x86/kernel/mpparse.c | 59 ++++++++++++++++++------------------- arch/x86/mach-generic/es7000.c | 4 +- 3 files changed, 41 insertions(+), 42 deletions(-)
arch/x86/include/asm/mpspec_def.h +10 -10
@@ -40,16 +40,16 @@ struct intel_mp_floating {#define MPC_SIGNATURE "PCMP"struct mpc_table { -char mpc_signature[4 ]; -unsigned short mpc_length;/* Size of table */ -char mpc_spec;/* 0x01 */ -char mpc_checksum; -char mpc_oem[8 ]; -char mpc_productid[12 ]; -unsigned int mpc_oemptr;/* 0 if not present */ -unsigned short mpc_oemsize;/* 0 if not present */ -unsigned short mpc_oemcount; -unsigned int mpc_lapic;/* APIC address */ +char signature[4 ]; +unsigned short length;/* Size of table */ +char spec;/* 0x01 */ +char checksum; +char oem[8 ]; +char productid[12 ]; +unsigned int oemptr;/* 0 if not present */ +unsigned short oemsize;/* 0 if not present */ +unsigned short oemcount; +unsigned int lapic;/* APIC address */ unsigned int reserved; };
arch/x86/kernel/mpparse.c +29 -30
148 lines not on this page · raw message
arch/x86/mach-generic/es7000.c +2 -2
@@ -46,9 +46,9 @@ static void __init enable_apic_mode(void)static __init int mps_oem_check (struct mpc_table *mpc,char *oem,char *productid) { -if (mpc->mpc_oemptr) { +if (mpc->oemptr) {struct mpc_oemtable *oem_table = - (struct mpc_oemtable *)mpc->mpc_oemptr; + (struct mpc_oemtable *)mpc->oemptr;if (!strncmp (oem,"UNISYS" ,6 ))return parse_unisys_oem ((char *)oem_table); }
Signature · 1 line
1.5.5.1