git: b2c68dc6d9b3 - main - amd64: ansify
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 07 Feb 2023 22:53:14 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b2c68dc6d9b31de853664ac9277816678d2c9181 commit b2c68dc6d9b31de853664ac9277816678d2c9181 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2023-02-07 22:52:06 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2023-02-07 22:52:06 +0000 amd64: ansify Reported by: clang 15 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/amd64/amd64/db_disasm.c | 23 +++++------------------ sys/amd64/amd64/machdep.c | 15 ++++----------- sys/amd64/amd64/sys_machdep.c | 8 ++------ 3 files changed, 11 insertions(+), 35 deletions(-) diff --git a/sys/amd64/amd64/db_disasm.c b/sys/amd64/amd64/db_disasm.c index ac71d7e06609..54f7beda1169 100644 --- a/sys/amd64/amd64/db_disasm.c +++ b/sys/amd64/amd64/db_disasm.c @@ -1045,12 +1045,8 @@ static db_addr_t * Read address at location and return updated location. */ static db_addr_t -db_read_address(loc, short_addr, rex, regmodrm, addrp) - db_addr_t loc; - int short_addr; - int rex; - int regmodrm; - struct i_addr * addrp; /* out */ +db_read_address(db_addr_t loc, int short_addr, int rex, int regmodrm, + struct i_addr *addrp) { int mod, rm, sib, index, disp, size, have_sib; @@ -1113,11 +1109,7 @@ db_read_address(loc, short_addr, rex, regmodrm, addrp) } static void -db_print_address(seg, size, rex, addrp) - const char * seg; - int size; - int rex; - struct i_addr * addrp; +db_print_address(const char *seg, int size, int rex, struct i_addr *addrp) { if (addrp->is_reg) { db_printf("%s", db_reg[rex != 0 ? 1 : 0][(size == LONG && (rex & REX_W)) ? QUAD : size][addrp->disp]); @@ -1145,13 +1137,8 @@ db_print_address(seg, size, rex, addrp) * and return updated location. */ static db_addr_t -db_disasm_esc(loc, inst, rex, short_addr, size, seg) - db_addr_t loc; - int inst; - int rex; - int short_addr; - int size; - const char * seg; +db_disasm_esc(db_addr_t loc, int inst, int rex, int short_addr, int size, + const char *seg) { int regmodrm; const struct finst * fp; diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index a14c3e408541..f33f2c6509f0 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -220,8 +220,7 @@ void (*vmm_resume_p)(void); bool efi_boot; static void -cpu_startup(dummy) - void *dummy; +cpu_startup(void *dummy) { uintmax_t memsize; char *sysenv; @@ -584,9 +583,7 @@ DB_SHOW_COMMAND_FLAGS(dbregs, db_show_dbregs, DB_CMD_MEMSAFE) #endif void -sdtossd(sd, ssd) - struct user_segment_descriptor *sd; - struct soft_segment_descriptor *ssd; +sdtossd(struct user_segment_descriptor *sd, struct soft_segment_descriptor *ssd) { ssd->ssd_base = (sd->sd_hibase << 24) | sd->sd_lobase; @@ -600,9 +597,7 @@ sdtossd(sd, ssd) } void -ssdtosd(ssd, sd) - struct soft_segment_descriptor *ssd; - struct user_segment_descriptor *sd; +ssdtosd(struct soft_segment_descriptor *ssd, struct user_segment_descriptor *sd) { sd->sd_lobase = (ssd->ssd_base) & 0xffffff; @@ -618,9 +613,7 @@ ssdtosd(ssd, sd) } void -ssdtosyssd(ssd, sd) - struct soft_segment_descriptor *ssd; - struct system_segment_descriptor *sd; +ssdtosyssd(struct soft_segment_descriptor *ssd, struct system_segment_descriptor *sd) { sd->sd_lobase = (ssd->ssd_base) & 0xffffff; diff --git a/sys/amd64/amd64/sys_machdep.c b/sys/amd64/amd64/sys_machdep.c index 05c90f57ec6c..a3716a354448 100644 --- a/sys/amd64/amd64/sys_machdep.c +++ b/sys/amd64/amd64/sys_machdep.c @@ -391,9 +391,7 @@ sysarch(struct thread *td, struct sysarch_args *uap) } int -amd64_set_ioperm(td, uap) - struct thread *td; - struct i386_ioperm_args *uap; +amd64_set_ioperm(struct thread *td, struct i386_ioperm_args *uap) { char *iomap; struct amd64tss *tssp; @@ -447,9 +445,7 @@ amd64_set_ioperm(td, uap) } int -amd64_get_ioperm(td, uap) - struct thread *td; - struct i386_ioperm_args *uap; +amd64_get_ioperm(struct thread *td, struct i386_ioperm_args *uap) { int i, state; char *iomap;