[PATCH v2] usb: renesas_usbhs: fixup cast warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch fixup cast warning on 64 bit compiler

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
Reported-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
To Greg, Stephen

I guess this patch solve compile warning of "renesas_usbhs".
I'm so sorry. 32bit compiler didn't show it to me.

v1 -> v2

modify wrong calculation

 drivers/usb/renesas_usbhs/pipe.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/renesas_usbhs/pipe.h b/drivers/usb/renesas_usbhs/pipe.h
index 4a60dce..1cca9b7 100644
--- a/drivers/usb/renesas_usbhs/pipe.h
+++ b/drivers/usb/renesas_usbhs/pipe.h
@@ -93,8 +93,7 @@ void usbhs_pipe_init(struct usbhs_priv *priv);
 int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe);
 void usbhs_pipe_clear_sequence(struct usbhs_pipe *pipe);
 
-#define usbhs_pipe_number(p)	(((u32)(p) - (u32)(p)->priv->pipe_info.pipe) / \
-				 sizeof(struct usbhs_pipe))
+#define usbhs_pipe_number(p)	(int)((p) - (p)->priv->pipe_info.pipe)
 
 /*
  * dcp control
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux