Browse Source

usb: renesas_usbhs: fixup cast warning

This patch fixup cast warning on 64 bit compiler

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reported-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kuninori Morimoto 14 năm trước cách đây
mục cha
commit
c89d2613b8
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      drivers/usb/renesas_usbhs/pipe.h

+ 1 - 2
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