summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/uvc
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-02-07 04:13:35 -0500
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-02-18 15:18:51 -0500
commit45602f7110fe8fa2d109641d6f80fb7d6ccf9b5a (patch)
tree4b8572fe1aa3d2c5debc00302a9232297432ae94 /drivers/media/usb/uvc
parentb8726aea59de780a2eb95897f133284d742d6c83 (diff)
downloadlinux-45602f7110fe8fa2d109641d6f80fb7d6ccf9b5a.tar.bz2
media: uvcvideo: Fix smatch warning
drivers/media/usb/uvc/uvc_video.c: drivers/media/usb/uvc/uvc_video.c:1893 uvc_video_start_transfer() warn: argument 2 to %u specifier is cast from pointer Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb/uvc')
-rw-r--r--drivers/media/usb/uvc/uvcvideo.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index 9b41b14ce076..c7c1baa90dea 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -620,8 +620,10 @@ struct uvc_streaming {
(uvc_urb) < &(uvc_streaming)->uvc_urb[UVC_URBS]; \
++(uvc_urb))
-#define uvc_urb_index(uvc_urb) \
- (unsigned int)((uvc_urb) - (&(uvc_urb)->stream->uvc_urb[0]))
+static inline u32 uvc_urb_index(const struct uvc_urb *uvc_urb)
+{
+ return uvc_urb - &uvc_urb->stream->uvc_urb[0];
+}
struct uvc_device_info {
u32 quirks;