Re: [PATCH V2] dummy_hcd: replace timeval with timespec64

2015-09-17 Thread Pingbo Wen
On Thursday, September 17, 2015 05:59 PM, Peter Stuge wrote: > WEN Pingbo wrote: >> +++ b/drivers/usb/gadget/udc/dummy_hcd.c >> @@ -833,10 +833,10 @@ static const struct usb_ep_ops dummy_ep_ops = { >> /* there are both host and device side versions of this call ... */ >> static int dummy_g_get_

Re: [PATCH V2] dummy_hcd: replace timeval with timespec64

2015-09-17 Thread Peter Stuge
WEN Pingbo wrote: > +++ b/drivers/usb/gadget/udc/dummy_hcd.c > @@ -833,10 +833,10 @@ static const struct usb_ep_ops dummy_ep_ops = { > /* there are both host and device side versions of this call ... */ > static int dummy_g_get_frame(struct usb_gadget *_gadget) > { > - struct timeval tv; >

Re: [PATCH V2] dummy_hcd: replace timeval with timespec64

2015-09-17 Thread Arnd Bergmann
On Thursday 17 September 2015 11:09:49 WEN Pingbo wrote: > The millisecond of the last second will be normal if tv_sec is > overflowed. But for y2038 consistency and demonstration purpose, > and avoiding further risks, we need to remove 'timeval' in this > driver, to avoid similair problems. > > V

Re: [PATCH V2] dummy_hcd: replace timeval with timespec64

2015-09-16 Thread Pingbo Wen
add Alan Stern On Thursday, September 17, 2015 11:09 AM, WEN Pingbo wrote: > The millisecond of the last second will be normal if tv_sec is > overflowed. But for y2038 consistency and demonstration purpose, > and avoiding further risks, we need to remove 'timeval' in this > driver, to avoid simila

[PATCH V2] dummy_hcd: replace timeval with timespec64

2015-09-16 Thread WEN Pingbo
The millisecond of the last second will be normal if tv_sec is overflowed. But for y2038 consistency and demonstration purpose, and avoiding further risks, we need to remove 'timeval' in this driver, to avoid similair problems. V2 Updates: - using monotonic time here by replacing getnstimeofday()