From 9f8b29f1cd476563fe60c909fbe9d5ea603c398a Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sun, 25 Dec 2016 21:55:01 +0000 Subject: [PATCH] Use printflags64 instead of printflags_long After the change of tcb.u_arg type from long to kernel_ureg_t it is safe to stop using printflags_long proxy and pass syscall arguments directly to printflags64. * defs.h (printflags_long): Remove. * fcntl.c (print_fcntl): Replace printflags_long with printflags64. * numa.c (SYS_FUNC(get_mempolicy)): Likewise. * perf.c (SYS_FUNC(perf_event_open)): Likewise. * sram_alloc.c [BFIN] (SYS_FUNC(sram_alloc)): Likewise. --- defs.h | 6 ------ fcntl.c | 4 ++-- numa.c | 2 +- perf.c | 2 +- sram_alloc.c | 2 +- 5 files changed, 5 insertions(+), 11 deletions(-) diff --git a/defs.h b/defs.h index 86c26f70..248e33c9 100644 --- a/defs.h +++ b/defs.h @@ -782,12 +782,6 @@ printflags(const struct xlat *x, unsigned int flags, const char *dflt) return printflags64(x, flags, dflt); } -static inline int -printflags_long(const struct xlat *x, unsigned long flags, const char *dflt) -{ - return printflags64(x, flags, dflt); -} - static inline int printxval64(const struct xlat *x, const uint64_t val, const char *dflt) { diff --git a/fcntl.c b/fcntl.c index f9379e62..7d104668 100644 --- a/fcntl.c +++ b/fcntl.c @@ -122,7 +122,7 @@ print_fcntl(struct tcb *tcp) break; case F_NOTIFY: tprints(", "); - printflags_long(notifyflags, tcp->u_arg[2], "DN_???"); + printflags64(notifyflags, tcp->u_arg[2], "DN_???"); break; case F_SETLEASE: tprints(", "); @@ -130,7 +130,7 @@ print_fcntl(struct tcb *tcp) break; case F_ADD_SEALS: tprints(", "); - printflags_long(f_seals, tcp->u_arg[2], "F_SEAL_???"); + printflags64(f_seals, tcp->u_arg[2], "F_SEAL_???"); break; case F_SETSIG: tprints(", "); diff --git a/numa.c b/numa.c index af5b70ae..a990685c 100644 --- a/numa.c +++ b/numa.c @@ -113,7 +113,7 @@ SYS_FUNC(get_mempolicy) tprintf(", %lu, ", tcp->u_arg[2]); printaddr(tcp->u_arg[3]); tprints(", "); - printflags_long(mempolicyflags, tcp->u_arg[4], "MPOL_???"); + printflags64(mempolicyflags, tcp->u_arg[4], "MPOL_???"); } return 0; } diff --git a/perf.c b/perf.c index f6e6a32d..b01e593e 100644 --- a/perf.c +++ b/perf.c @@ -423,7 +423,7 @@ SYS_FUNC(perf_event_open) (int) tcp->u_arg[1], (int) tcp->u_arg[2], (int) tcp->u_arg[3]); - printflags_long(perf_event_open_flags, tcp->u_arg[4], "PERF_FLAG_???"); + printflags64(perf_event_open_flags, tcp->u_arg[4], "PERF_FLAG_???"); return RVAL_DECODED | RVAL_FD; } diff --git a/sram_alloc.c b/sram_alloc.c index 969e10ee..922746bb 100644 --- a/sram_alloc.c +++ b/sram_alloc.c @@ -11,7 +11,7 @@ SYS_FUNC(sram_alloc) /* size */ tprintf("%lu, ", tcp->u_arg[0]); /* flags */ - printflags_long(sram_alloc_flags, tcp->u_arg[1], "???_SRAM"); + printflags64(sram_alloc_flags, tcp->u_arg[1], "???_SRAM"); return RVAL_DECODED | RVAL_HEX; }