linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: renesas_usbhs: fix type of buf
@ 2019-10-15 15:30 Ben Dooks (Codethink)
  2019-10-16  2:33 ` Yoshihiro Shimoda
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks (Codethink) @ 2019-10-15 15:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ben Dooks (Codethink),
	Greg Kroah-Hartman, Yoshihiro Shimoda, linux-usb, linux-kernel

Fix the type of buf in __usbhsg_recip_send_status to
be __le16 to avoid the following sparse warning:

drivers/usb/renesas_usbhs/mod_gadget.c:335:14: warning: incorrect type in assignment (different base types)
drivers/usb/renesas_usbhs/mod_gadget.c:335:14:    expected unsigned short
drivers/usb/renesas_usbhs/mod_gadget.c:335:14:    got restricted __le16 [usertype]

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/usb/renesas_usbhs/mod_gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index e5ef56991dba..0b8a2920de10 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -315,7 +315,7 @@ static void __usbhsg_recip_send_status(struct usbhsg_gpriv *gpriv,
 	struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(dcp);
 	struct device *dev = usbhsg_gpriv_to_dev(gpriv);
 	struct usb_request *req;
-	unsigned short *buf;
+	__le16 *buf;
 
 	/* alloc new usb_request for recip */
 	req = usb_ep_alloc_request(&dcp->ep, GFP_ATOMIC);
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] usb: renesas_usbhs: fix type of buf
  2019-10-15 15:30 [PATCH] usb: renesas_usbhs: fix type of buf Ben Dooks (Codethink)
@ 2019-10-16  2:33 ` Yoshihiro Shimoda
  0 siblings, 0 replies; 2+ messages in thread
From: Yoshihiro Shimoda @ 2019-10-16  2:33 UTC (permalink / raw)
  To: Ben Dooks (Codethink), linux-kernel
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

Hi Ben,

> From: Ben Dooks (Codethink), Sent: Wednesday, October 16, 2019 12:30 AM
> 
> Fix the type of buf in __usbhsg_recip_send_status to
> be __le16 to avoid the following sparse warning:
> 
> drivers/usb/renesas_usbhs/mod_gadget.c:335:14: warning: incorrect type in assignment (different base types)
> drivers/usb/renesas_usbhs/mod_gadget.c:335:14:    expected unsigned short
> drivers/usb/renesas_usbhs/mod_gadget.c:335:14:    got restricted __le16 [usertype]
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

Thank you for the patch!

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

I also found a parse warning in the usbhsg_recip_handler_std_set_device().
So, I'll make a patch to fix the warning.

Best regards,
Yoshihiro Shimoda


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-16  2:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 15:30 [PATCH] usb: renesas_usbhs: fix type of buf Ben Dooks (Codethink)
2019-10-16  2:33 ` Yoshihiro Shimoda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).