git: f0fe68a965a2 - main - i386: ansify

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Sat, 25 Mar 2023 20:55:12 UTC
The branch main has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=f0fe68a965a2f0b42c296fef2c756f168a57b326

commit f0fe68a965a2f0b42c296fef2c756f168a57b326
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-03-25 20:21:03 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-03-25 20:21:03 +0000

    i386: ansify
    
    Reported by:    clang 15
---
 sys/i386/i386/db_disasm.c        | 20 +++++---------------
 sys/i386/i386/db_trace.c         | 12 +++---------
 sys/i386/i386/in_cksum_machdep.c |  5 +----
 sys/i386/i386/machdep.c          |  7 ++-----
 sys/i386/i386/sys_machdep.c      |  8 ++------
 5 files changed, 13 insertions(+), 39 deletions(-)

diff --git a/sys/i386/i386/db_disasm.c b/sys/i386/i386/db_disasm.c
index 2d5a65fe31d3..46b0a1b8a895 100644
--- a/sys/i386/i386/db_disasm.c
+++ b/sys/i386/i386/db_disasm.c
@@ -938,11 +938,8 @@ static db_addr_t
  * Read address at location and return updated location.
  */
 static db_addr_t
-db_read_address(loc, short_addr, regmodrm, addrp)
-	db_addr_t	loc;
-	int		short_addr;
-	int		regmodrm;
-	struct i_addr *	addrp;		/* out */
+db_read_address(db_addr_t loc, int short_addr, int regmodrm,
+    struct i_addr *addrp)
 {
 	int		mod, rm, sib, index, disp;
 
@@ -1026,10 +1023,7 @@ db_read_address(loc, short_addr, regmodrm, addrp)
 }
 
 static void
-db_print_address(seg, size, addrp)
-	const char *	seg;
-	int		size;
-	struct i_addr *	addrp;
+db_print_address(const char *seg, int size, struct i_addr *addrp)
 {
 	if (addrp->is_reg) {
 	    db_printf("%s", db_reg[size][addrp->disp]);
@@ -1059,12 +1053,8 @@ db_print_address(seg, size, addrp)
  * and return updated location.
  */
 static db_addr_t
-db_disasm_esc(loc, inst, short_addr, size, seg)
-	db_addr_t	loc;
-	int		inst;
-	int		short_addr;
-	int		size;
-	const char *	seg;
+db_disasm_esc(db_addr_t loc, int inst, int short_addr, int size,
+    const char *seg)
 {
 	int		regmodrm;
 	const struct finst *	fp;
diff --git a/sys/i386/i386/db_trace.c b/sys/i386/i386/db_trace.c
index 47057906fa58..cc386cb88a8c 100644
--- a/sys/i386/i386/db_trace.c
+++ b/sys/i386/i386/db_trace.c
@@ -200,8 +200,7 @@ static void db_print_stack_entry(const char *, int, char **, int *, db_addr_t,
  * Figure out how many arguments were passed into the frame at "fp".
  */
 static int
-db_numargs(fp)
-	struct i386_frame *fp;
+db_numargs(struct i386_frame *fp)
 {
 	char   *argp;
 	int	inst;
@@ -232,13 +231,8 @@ retry:
 }
 
 static void
-db_print_stack_entry(name, narg, argnp, argp, callpc, frame)
-	const char *name;
-	int narg;
-	char **argnp;
-	int *argp;
-	db_addr_t callpc;
-	void *frame;
+db_print_stack_entry(const char *name, int narg, char **argnp, int *argp,
+    db_addr_t callpc, void *frame)
 {
 	int n = narg >= 0 ? narg : 5;
 
diff --git a/sys/i386/i386/in_cksum_machdep.c b/sys/i386/i386/in_cksum_machdep.c
index 31ecd2baa7ca..528ce5ac80ff 100644
--- a/sys/i386/i386/in_cksum_machdep.c
+++ b/sys/i386/i386/in_cksum_machdep.c
@@ -69,10 +69,7 @@ __FBSDID("$FreeBSD$");
  * other calculations.
  */
 u_short
-in_cksum_skip(m, len, skip)
-	struct mbuf *m;
-	int len;
-	int skip;
+in_cksum_skip(struct mbuf *m, int len, int skip)
 {
 	u_short *w;
 	unsigned sum = 0;
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 8e3b21dbe195..d59e95ed1a99 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -212,8 +212,7 @@ i386_clock_source_init(void)
 }
 
 static void
-cpu_startup(dummy)
-	void *dummy;
+cpu_startup(void *dummy)
 {
 	uintmax_t memsize;
 	char *sysenv;
@@ -739,9 +738,7 @@ DB_SHOW_COMMAND(frame, db_show_frame)
 #endif
 
 void
-sdtossd(sd, ssd)
-	struct segment_descriptor *sd;
-	struct soft_segment_descriptor *ssd;
+sdtossd(struct segment_descriptor *sd, struct soft_segment_descriptor *ssd)
 {
 	ssd->ssd_base  = (sd->sd_hibase << 24) | sd->sd_lobase;
 	ssd->ssd_limit = (sd->sd_hilimit << 16) | sd->sd_lolimit;
diff --git a/sys/i386/i386/sys_machdep.c b/sys/i386/i386/sys_machdep.c
index a0a1c273f467..eeff4b280696 100644
--- a/sys/i386/i386/sys_machdep.c
+++ b/sys/i386/i386/sys_machdep.c
@@ -334,9 +334,7 @@ i386_extend_pcb(struct thread *td)
 }
 
 int
-i386_set_ioperm(td, uap)
-	struct thread *td;
-	struct i386_ioperm_args *uap;
+i386_set_ioperm(struct thread *td, struct i386_ioperm_args *uap)
 {
 	char *iomap;
 	u_int i;
@@ -372,9 +370,7 @@ i386_set_ioperm(td, uap)
 }
 
 int
-i386_get_ioperm(td, uap)
-	struct thread *td;
-	struct i386_ioperm_args *uap;
+i386_get_ioperm(struct thread *td, struct i386_ioperm_args *uap)
 {
 	int i, state;
 	char *iomap;