Search Linux Wireless

[PATCH 04/22] x86: Replace comments with C99 initializers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This replaces comments with C99's designated
initializers because the kernel supports them now.

Signed-off-by: Benjamin Stürz <benni@xxxxxxxxxx>
---
 arch/x86/include/asm/kgdb.h   | 80 +++++++++++++++++------------------
 arch/x86/kernel/cpu/mtrr/if.c | 14 +++---
 2 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/arch/x86/include/asm/kgdb.h b/arch/x86/include/asm/kgdb.h
index aacaf2502bd2..a9161e2f8b63 100644
--- a/arch/x86/include/asm/kgdb.h
+++ b/arch/x86/include/asm/kgdb.h
@@ -25,52 +25,52 @@
  */
 #ifdef CONFIG_X86_32
 enum regnames {
-	GDB_AX,			/* 0 */
-	GDB_CX,			/* 1 */
-	GDB_DX,			/* 2 */
-	GDB_BX,			/* 3 */
-	GDB_SP,			/* 4 */
-	GDB_BP,			/* 5 */
-	GDB_SI,			/* 6 */
-	GDB_DI,			/* 7 */
-	GDB_PC,			/* 8 also known as eip */
-	GDB_PS,			/* 9 also known as eflags */
-	GDB_CS,			/* 10 */
-	GDB_SS,			/* 11 */
-	GDB_DS,			/* 12 */
-	GDB_ES,			/* 13 */
-	GDB_FS,			/* 14 */
-	GDB_GS,			/* 15 */
+	GDB_AX = 0,
+	GDB_CX = 1,
+	GDB_DX = 2,
+	GDB_BX = 3,
+	GDB_SP = 4,
+	GDB_BP = 5,
+	GDB_SI = 6,
+	GDB_DI = 7,
+	GDB_PC = 8,			/* also known as eip */
+	GDB_PS = 9,			/* also known as eflags */
+	GDB_CS = 10,
+	GDB_SS = 11,
+	GDB_DS = 12,
+	GDB_ES = 13,
+	GDB_FS = 14,
+	GDB_GS = 15,
 };
 #define GDB_ORIG_AX		41
 #define DBG_MAX_REG_NUM		16
 #define NUMREGBYTES		((GDB_GS+1)*4)
 #else /* ! CONFIG_X86_32 */
 enum regnames {
-	GDB_AX,			/* 0 */
-	GDB_BX,			/* 1 */
-	GDB_CX,			/* 2 */
-	GDB_DX,			/* 3 */
-	GDB_SI,			/* 4 */
-	GDB_DI,			/* 5 */
-	GDB_BP,			/* 6 */
-	GDB_SP,			/* 7 */
-	GDB_R8,			/* 8 */
-	GDB_R9,			/* 9 */
-	GDB_R10,		/* 10 */
-	GDB_R11,		/* 11 */
-	GDB_R12,		/* 12 */
-	GDB_R13,		/* 13 */
-	GDB_R14,		/* 14 */
-	GDB_R15,		/* 15 */
-	GDB_PC,			/* 16 */
-	GDB_PS,			/* 17 */
-	GDB_CS,			/* 18 */
-	GDB_SS,			/* 19 */
-	GDB_DS,			/* 20 */
-	GDB_ES,			/* 21 */
-	GDB_FS,			/* 22 */
-	GDB_GS,			/* 23 */
+	GDB_AX   =  0,
+	GDB_BX   =  1,
+	GDB_CX   =  2,
+	GDB_DX   =  3,
+	GDB_SI   =  4,
+	GDB_DI   =  5,
+	GDB_BP   =  6,
+	GDB_SP   =  7,
+	GDB_R8   =  8,
+	GDB_R9   =  9,
+	GDB_R10  = 10,
+	GDB_R11  = 11,
+	GDB_R12  = 12,
+	GDB_R13  = 13,
+	GDB_R14  = 14,
+	GDB_R15  = 15,
+	GDB_PC   = 16,			/* also known as eip */
+	GDB_PS   = 17,			/* also known as eflags */
+	GDB_CS   = 18,
+	GDB_SS   = 19,
+	GDB_DS   = 20,
+	GDB_ES   = 21,
+	GDB_FS   = 22,
+	GDB_GS   = 23,
 };
 #define GDB_ORIG_AX		57
 #define DBG_MAX_REG_NUM		24
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c
index a5c506f6da7f..7664a672f414 100644
--- a/arch/x86/kernel/cpu/mtrr/if.c
+++ b/arch/x86/kernel/cpu/mtrr/if.c
@@ -18,13 +18,13 @@
 
 static const char *const mtrr_strings[MTRR_NUM_TYPES] =
 {
-	"uncachable",		/* 0 */
-	"write-combining",	/* 1 */
-	"?",			/* 2 */
-	"?",			/* 3 */
-	"write-through",	/* 4 */
-	"write-protect",	/* 5 */
-	"write-back",		/* 6 */
+	[0] = "uncachable",
+	[1] = "write-combining",
+	[2] = "?",
+	[3] = "?",
+	[4] = "write-through",
+	[5] = "write-protect",
+	[6] = "write-back",
 };
 
 const char *mtrr_attrib_to_str(int x)
-- 
2.35.1




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux