All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: sakari.ailus@linux.intel.com,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [PATCH 3/6] uvc: fix smatch warning
Date: Thu,  7 Feb 2019 10:13:35 +0100	[thread overview]
Message-ID: <20190207091338.55705-4-hverkuil-cisco@xs4all.nl> (raw)
In-Reply-To: <20190207091338.55705-1-hverkuil-cisco@xs4all.nl>

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>
---
 drivers/media/usb/uvc/uvcvideo.h | 6 ++++--
 1 file 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;
-- 
2.20.1


  parent reply	other threads:[~2019-02-07  9:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07  9:13 [PATCH 0/6] sparse/smatch fixes Hans Verkuil
2019-02-07  9:13 ` [PATCH 1/6] hdpvr: fix smatch warning Hans Verkuil
2019-02-07  9:13 ` [PATCH 2/6] vim2m: " Hans Verkuil
2019-02-07  9:13 ` Hans Verkuil [this message]
2019-02-07 14:57   ` [PATCH 3/6] uvc: " Kieran Bingham
2019-02-07 15:41     ` Laurent Pinchart
2019-02-07 16:35       ` Hans Verkuil
2019-02-07  9:13 ` [PATCH 4/6] vsp1: " Hans Verkuil
2019-02-12 13:48   ` Kieran Bingham
2019-02-12 16:31     ` Laurent Pinchart
2019-02-07  9:13 ` [PATCH 5/6] omap3isp: fix sparse warning Hans Verkuil
2019-02-07  9:18   ` Hans Verkuil
2019-02-07 14:23   ` Sakari Ailus
2019-02-07 15:45   ` Laurent Pinchart
2019-02-07  9:13 ` [PATCH 6/6] pxa_camera: fix smatch warning Hans Verkuil
2019-02-07 14:11   ` Sakari Ailus
2019-02-07 14:38   ` [PATCH 7/6] omap4iss: fix sparse warning Hans Verkuil
2019-02-07 14:51     ` Sakari Ailus
2019-02-07 15:47     ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190207091338.55705-4-hverkuil-cisco@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.