git: e581f57b6ada - stable/13 - i386: ansify

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sun, 09 Apr 2023 21:35:49 UTC
The branch stable/13 has been updated by dim:

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

commit e581f57b6ada649744fbb8d9224b099f5aadb282
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-03-25 20:21:03 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-04-09 15:48:07 +0000

    i386: ansify
    
    Reported by:    clang 15
    
    (cherry picked from commit f0fe68a965a2f0b42c296fef2c756f168a57b326)
---
 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 ec8b35e8afe8..833bd1609092 100644
--- a/sys/i386/i386/in_cksum_machdep.c
+++ b/sys/i386/i386/in_cksum_machdep.c
@@ -260,10 +260,7 @@ u_int in_cksum_hdr(const struct ip *ip)
  * 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 27a323bce62a..97b095337852 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -215,8 +215,7 @@ i386_clock_source_init(void)
 }
 
 static void
-cpu_startup(dummy)
-	void *dummy;
+cpu_startup(void *dummy)
 {
 	uintmax_t memsize;
 	char *sysenv;
@@ -746,9 +745,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;