usb: renesas_usbhs: tidyup original usbhsx_for_each_xxx macro
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 12 Jul 2013 05:32:31 +0000 (22:32 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Mon, 19 Mar 2018 18:58:23 +0000 (18:58 +0000)
commit416180d566ee1ed370a65e752a5f0dae2e91765b
treef2ee76d6f8be6713e8e3874180fac2bdc9c68d8e
parent3cecd88c3f70ed1791368ed26447a9c7e49a4378
usb: renesas_usbhs: tidyup original usbhsx_for_each_xxx macro

commit 925403f425a4a9c503f2fc295652647b1eb10d82 upstream.

Current usbhsx_for_each_xxx macro will read out-of-array's
memory after last loop operation.
It was not good C language operation, and the binary which was
compiled by (at least) gcc 4.8.1 is broken
This patch tidyup these issues

Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Reviewed-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/renesas_usbhs/mod_gadget.c
drivers/usb/renesas_usbhs/mod_host.c
drivers/usb/renesas_usbhs/pipe.h