lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220326165909.506926-4-benni@stuerz.xyz>
Date:   Sat, 26 Mar 2022 17:58:51 +0100
From:   Benjamin Stürz <benni@...erz.xyz>
To:     andrew@...n.ch
Cc:     sebastian.hesselbarth@...il.com, gregory.clement@...tlin.com,
        linux@...linux.org.uk, linux@...tec.co.uk, krzk@...nel.org,
        alim.akhtar@...sung.com, tglx@...utronix.de, mingo@...hat.com,
        bp@...en8.de, dave.hansen@...ux.intel.com, hpa@...or.com,
        robert.moore@...el.com, rafael.j.wysocki@...el.com,
        lenb@...nel.org, 3chas3@...il.com, laforge@...monks.org,
        arnd@...db.de, gregkh@...uxfoundation.org, mchehab@...nel.org,
        tony.luck@...el.com, james.morse@....com, rric@...nel.org,
        linus.walleij@...aro.org, brgl@...ev.pl,
        mike.marciniszyn@...nelisnetworks.com,
        dennis.dalessandro@...nelisnetworks.com, jgg@...pe.ca,
        pali@...nel.org, dmitry.torokhov@...il.com, isdn@...ux-pingi.de,
        benh@...nel.crashing.org, fbarrat@...ux.ibm.com, ajd@...ux.ibm.com,
        davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
        nico@...xnic.net, loic.poulain@...aro.org, kvalo@...nel.org,
        pkshih@...ltek.com, bhelgaas@...gle.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        linux-samsung-soc@...r.kernel.org, linux-ia64@...r.kernel.org,
        linux-acpi@...r.kernel.org, devel@...ica.org,
        linux-atm-general@...ts.sourceforge.net, netdev@...r.kernel.org,
        linux-edac@...r.kernel.org, linux-gpio@...r.kernel.org,
        linux-rdma@...r.kernel.org, linux-input@...r.kernel.org,
        linuxppc-dev@...ts.ozlabs.org, linux-media@...r.kernel.org,
        wcn36xx@...ts.infradead.org, linux-wireless@...r.kernel.org,
        linux-pci@...r.kernel.org,
        Benjamin Stürz <benni@...erz.xyz>
Subject: [PATCH 04/22] x86: Replace comments with C99 initializers

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

Signed-off-by: Benjamin Stürz <benni@...erz.xyz>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ