git: a2f6734d9d5d - stable/13 - dtrace: get rid of uchar_t types
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 07 May 2023 17:59:52 UTC
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a2f6734d9d5da7d5407d8b61b926967920fec4d4 commit a2f6734d9d5da7d5407d8b61b926967920fec4d4 Author: Christos Margiolis <christos@FreeBSD.org> AuthorDate: 2023-04-20 16:19:42 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2023-05-07 17:54:08 +0000 dtrace: get rid of uchar_t types Callers are specifying uint8_t anyway and this slightly reduces dependencies on compatibility typedefs. No functional change intended. Reviewed by: markj, mhorne MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39490 (cherry picked from commit 1a149d65baed31b90a0b8abe2d6c5a568122a5ec) --- sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h | 4 ++-- sys/cddl/dev/dtrace/amd64/dtrace_subr.c | 4 ++-- sys/cddl/dev/dtrace/i386/dtrace_subr.c | 4 ++-- sys/cddl/dev/dtrace/x86/instr_size.c | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h index 5cad5a3b18c9..d3d8fbca6164 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h +++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h @@ -2399,8 +2399,8 @@ extern void dtrace_safe_synchronous_signal(void); extern int dtrace_mach_aframes(void); #if defined(__i386) || defined(__amd64) -extern int dtrace_instr_size(uchar_t *instr); -extern int dtrace_instr_size_isa(uchar_t *, model_t, int *); +extern int dtrace_instr_size(uint8_t *instr); +extern int dtrace_instr_size_isa(uint8_t *, model_t, int *); extern void dtrace_invop_callsite(void); #endif extern void dtrace_invop_add(int (*)(uintptr_t, struct trapframe *, uintptr_t)); diff --git a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c index 2521afc7b443..c4a36e851c3f 100644 --- a/sys/cddl/dev/dtrace/amd64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/amd64/dtrace_subr.c @@ -449,7 +449,7 @@ dtrace_trap(struct trapframe *frame, u_int type) * Offset the instruction pointer to the instruction * following the one causing the fault. */ - frame->tf_rip += dtrace_instr_size((u_char *) frame->tf_rip); + frame->tf_rip += dtrace_instr_size((uint8_t *) frame->tf_rip); return (1); /* Page fault. */ case T_PAGEFLT: @@ -461,7 +461,7 @@ dtrace_trap(struct trapframe *frame, u_int type) * Offset the instruction pointer to the instruction * following the one causing the fault. */ - frame->tf_rip += dtrace_instr_size((u_char *) frame->tf_rip); + frame->tf_rip += dtrace_instr_size((uint8_t *) frame->tf_rip); return (1); default: /* Handle all other traps in the usual way. */ diff --git a/sys/cddl/dev/dtrace/i386/dtrace_subr.c b/sys/cddl/dev/dtrace/i386/dtrace_subr.c index 69a07e8ee968..dedc1ffe84c8 100644 --- a/sys/cddl/dev/dtrace/i386/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/i386/dtrace_subr.c @@ -449,7 +449,7 @@ dtrace_trap(struct trapframe *frame, u_int type) * Offset the instruction pointer to the instruction * following the one causing the fault. */ - frame->tf_eip += dtrace_instr_size((u_char *) frame->tf_eip); + frame->tf_eip += dtrace_instr_size((uint8_t *) frame->tf_eip); return (1); /* Page fault. */ case T_PAGEFLT: @@ -461,7 +461,7 @@ dtrace_trap(struct trapframe *frame, u_int type) * Offset the instruction pointer to the instruction * following the one causing the fault. */ - frame->tf_eip += dtrace_instr_size((u_char *) frame->tf_eip); + frame->tf_eip += dtrace_instr_size((uint8_t *) frame->tf_eip); return (1); default: /* Handle all other traps in the usual way. */ diff --git a/sys/cddl/dev/dtrace/x86/instr_size.c b/sys/cddl/dev/dtrace/x86/instr_size.c index 6eea987244b1..a2a9b9342566 100644 --- a/sys/cddl/dev/dtrace/x86/instr_size.c +++ b/sys/cddl/dev/dtrace/x86/instr_size.c @@ -49,8 +49,8 @@ typedef u_int model_t; #define DATAMODEL_NATIVE 0 -int dtrace_instr_size(uchar_t *); -int dtrace_instr_size_isa(uchar_t *, model_t, int *); +int dtrace_instr_size(uint8_t *); +int dtrace_instr_size_isa(uint8_t *, model_t, int *); #endif #include <dis_tables.h> @@ -83,7 +83,7 @@ static int dtrace_dis_get_byte(void *p) { int ret; - uchar_t **instr = p; + uint8_t **instr = p; ret = **instr; *instr += 1; @@ -101,7 +101,7 @@ dtrace_dis_get_byte(void *p) */ /* ARGSUSED2 */ static int -dtrace_dis_isize(uchar_t *instr, dis_isize_t which, model_t model, int *rmindex) +dtrace_dis_isize(uint8_t *instr, dis_isize_t which, model_t model, int *rmindex) { int sz; dis86_t x; @@ -127,13 +127,13 @@ dtrace_dis_isize(uchar_t *instr, dis_isize_t which, model_t model, int *rmindex) } int -dtrace_instr_size_isa(uchar_t *instr, model_t model, int *rmindex) +dtrace_instr_size_isa(uint8_t *instr, model_t model, int *rmindex) { return (dtrace_dis_isize(instr, DIS_ISIZE_INSTR, model, rmindex)); } int -dtrace_instr_size(uchar_t *instr) +dtrace_instr_size(uint8_t *instr) { return (dtrace_dis_isize(instr, DIS_ISIZE_INSTR, DATAMODEL_NATIVE, NULL));