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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250819213911.174167-3-rpthibeault@gmail.com>
Date: Tue, 19 Aug 2025 17:39:10 -0400
From: Raphael Pinsonneault-Thibeault <rpthibeault@...il.com>
To: tglx@...utronix.de,
	mingo@...hat.com,
	bp@...en8.de,
	dave.hansen@...ux.intel.com,
	x86@...nel.org,
	hpa@...or.com,
	shuah@...nel.org
Cc: Raphael Pinsonneault-Thibeault <rpthibeault@...il.com>,
	linux-kernel@...r.kernel.org,
	linux-kselftest@...r.kernel.org
Subject: [PATCH] selftests/x86: fix coding style errors in test_syscall_vdso.c

fix 68 checkpatch errors in
tools/testing/selftests/x86/test_syscall_vdso.c:
add void to function definitions without parameters
fix whitespace in charp array definitions
fix whitespace in printf statements

Signed-off-by: Raphael Pinsonneault-Thibeault <rpthibeault@...il.com>
---

for the whitespace errors, attempted to maintain the “prettiness” 
of the charp definition and the printf statements

 .../testing/selftests/x86/test_syscall_vdso.c | 59 ++++++++++---------
 1 file changed, 30 insertions(+), 29 deletions(-)

diff --git a/tools/testing/selftests/x86/test_syscall_vdso.c b/tools/testing/selftests/x86/test_syscall_vdso.c
index 8965c311bd65..ee98c3cf4f56 100644
--- a/tools/testing/selftests/x86/test_syscall_vdso.c
+++ b/tools/testing/selftests/x86/test_syscall_vdso.c
@@ -116,10 +116,10 @@ void print_regs64(void)
 {
 	if (!kernel_is_64bit)
 		return;
-	printf("ax:%016llx bx:%016llx cx:%016llx dx:%016llx\n", regs64.rax,  regs64.rbx,  regs64.rcx,  regs64.rdx);
-	printf("si:%016llx di:%016llx bp:%016llx sp:%016llx\n", regs64.rsi,  regs64.rdi,  regs64.rbp,  regs64.rsp);
-	printf(" 8:%016llx  9:%016llx 10:%016llx 11:%016llx\n", regs64.r8 ,  regs64.r9 ,  regs64.r10,  regs64.r11);
-	printf("12:%016llx 13:%016llx 14:%016llx 15:%016llx\n", regs64.r12,  regs64.r13,  regs64.r14,  regs64.r15);
+	printf("ax:%016llx bx:%016llx cx:%016llx dx:%016llx\n",	regs64.rax,	regs64.rbx,	regs64.rcx,	regs64.rdx);
+	printf("si:%016llx di:%016llx bp:%016llx sp:%016llx\n",	regs64.rsi,	regs64.rdi,	regs64.rbp,	regs64.rsp);
+	printf(" 8:%016llx  9:%016llx 10:%016llx 11:%016llx\n",	regs64.r8,	regs64.r9,	regs64.r10,	regs64.r11);
+	printf("12:%016llx 13:%016llx 14:%016llx 15:%016llx\n",	regs64.r12,	regs64.r13,	regs64.r14,	regs64.r15);
 }
 
 int check_regs64(void)
@@ -179,7 +179,7 @@ struct {
 	int sz;
 } sigmask_desc;
 
-void prep_args()
+void prep_args(void)
 {
 	nfds = 42;
 	FD_ZERO(&rfds);
@@ -201,28 +201,28 @@ void prep_args()
 static void print_flags(const char *name, unsigned long r)
 {
 	static const char *bitarray[] = {
-	"\n" ,"c\n" ,/* Carry Flag */
-	"0 " ,"1 "  ,/* Bit 1 - always on */
-	""   ,"p "  ,/* Parity Flag */
-	"0 " ,"3? " ,
-	""   ,"a "  ,/* Auxiliary carry Flag */
-	"0 " ,"5? " ,
-	""   ,"z "  ,/* Zero Flag */
-	""   ,"s "  ,/* Sign Flag */
-	""   ,"t "  ,/* Trap Flag */
-	""   ,"i "  ,/* Interrupt Flag */
-	""   ,"d "  ,/* Direction Flag */
-	""   ,"o "  ,/* Overflow Flag */
-	"0 " ,"1 "  ,/* I/O Privilege Level (2 bits) */
-	"0"  ,"1"   ,/* I/O Privilege Level (2 bits) */
-	""   ,"n "  ,/* Nested Task */
-	"0 " ,"15? ",
-	""   ,"r "  ,/* Resume Flag */
-	""   ,"v "  ,/* Virtual Mode */
-	""   ,"ac " ,/* Alignment Check/Access Control */
-	""   ,"vif ",/* Virtual Interrupt Flag */
-	""   ,"vip ",/* Virtual Interrupt Pending */
-	""   ,"id " ,/* CPUID detection */
+	"\n",	"c\n",	/* Carry Flag */
+	"0 ",	"1 ",	/* Bit 1 - always on */
+	"",		"p ",	/* Parity Flag */
+	"0 ",	"3? ",
+	"",		"a ",	/* Auxiliary carry Flag */
+	"0 ",	"5? ",
+	"",		"z ",	/* Zero Flag */
+	"",		"s ",	/* Sign Flag */
+	"",		"t ",	/* Trap Flag */
+	"",		"i ",	/* Interrupt Flag */
+	"",		"d ",	/* Direction Flag */
+	"",		"o ",	/* Overflow Flag */
+	"0 ",	"1 ",	/* I/O Privilege Level (2 bits) */
+	"0",	"1",	/* I/O Privilege Level (2 bits) */
+	"",		"n ",	/* Nested Task */
+	"0 ",	"15? ",
+	"",		"r ",	/* Resume Flag */
+	"",		"v ",	/* Virtual Mode */
+	"",		"ac ",	/* Alignment Check/Access Control */
+	"",		"vif ",	/* Virtual Interrupt Flag */
+	"",		"vip ",	/* Virtual Interrupt Pending */
+	"",		"id ",	/* CPUID detection */
 	NULL
 	};
 	const char **bitstr;
@@ -320,7 +320,7 @@ int run_syscall(void)
 	return check_regs64();
 }
 
-int run_syscall_twice()
+int run_syscall_twice(void)
 {
 	int exitcode = 0;
 	long sv;
@@ -337,7 +337,7 @@ int run_syscall_twice()
 	return exitcode;
 }
 
-void ptrace_me()
+void ptrace_me(void)
 {
 	pid_t pid;
 
@@ -356,6 +356,7 @@ void ptrace_me()
 	printf("[RUN]\tRunning tests under ptrace\n");
 	while (1) {
 		int status;
+
 		pid = waitpid(-1, &status, __WALL);
 		if (WIFEXITED(status))
 			exit(WEXITSTATUS(status));
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ