From: Dmitry V. Levin Date: Sun, 25 Dec 2016 02:14:49 +0000 (+0000) Subject: v4l2: cast pointers to kernel_ureg_t instead of unsigned long X-Git-Tag: v4.16~244 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b7b6b9002cc2003063aad4b4889ebdb7f9952d4;p=strace v4l2: cast pointers to kernel_ureg_t instead of unsigned long * v4l2.c (print_v4l2_buffer): Remove redundant cast. (print_v4l2_framebuffer): Cast v4l2_framebuffer.base pointer to kernel_ureg_t instead of unsigned long. (print_v4l2_ext_controls): Cast v4l2_ext_controls.controls pointer to kernel_ureg_t instead of unsigned long. --- diff --git a/v4l2.c b/v4l2.c index ab50c189..78226e4a 100644 --- a/v4l2.c +++ b/v4l2.c @@ -360,7 +360,7 @@ print_v4l2_buffer(struct tcb *tcp, const unsigned int code, const long arg) tprintf(", m.offset=%#x", b.m.offset); } else if (b.memory == V4L2_MEMORY_USERPTR) { tprints(", m.userptr="); - printaddr((unsigned long) b.m.userptr); + printaddr(b.m.userptr); } tprintf(", length=%u, bytesused=%u, flags=", @@ -386,7 +386,7 @@ print_v4l2_framebuffer(struct tcb *tcp, const long arg) if (!umove_or_printaddr(tcp, arg, &b)) { tprintf("{capability=%#x, flags=%#x, base=", b.capability, b.flags); - printaddr((unsigned long) b.base); + printaddr((kernel_ureg_t) b.base); tprints("}"); } @@ -704,7 +704,7 @@ print_v4l2_ext_controls(struct tcb *tcp, const long arg, const bool is_get) tprints("controls="); struct_v4l2_ext_control ctrl; - bool fail = !print_array(tcp, (unsigned long) c.controls, c.count, + bool fail = !print_array(tcp, (kernel_ureg_t) c.controls, c.count, &ctrl, sizeof(ctrl), umoven_or_printaddr_ignore_syserror, print_v4l2_ext_control, 0);