Am Dienstag, 18. Mai 2004 02:43 schrieb David Brownell: > Oliver Neukum wrote: > > > +void usb_uninterruptible_sleep_ms(int msecs) > > +{ > > + long timeout = msecs_to_jiffies(msecs); > > while in <linux/time_t> > > static inline unsigned long msecs_to_jiffies(unsigned int m) > > Shouldn't "msecs" be "unsigned"? and then something like this
Right. A negative delay would have interesting implications. > long timeout = min(msecs_to_jiffies(msecs),MAX_SCHEDULE_TIMEOUT - 1); No. We must not silently wait for a shorter time than requested. Some hardware would work with it on a good day, other hardware would fail while it's raining, etc ... It's a bad thing. Do you want a BUG_ON()? Regards Oliver You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. =================================================================== [EMAIL PROTECTED], 2004-05-18 09:33:43+02:00, [EMAIL PROTECTED] - use unsigned drivers/usb/core/usb.c | 2 +- include/linux/usb.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c --- a/drivers/usb/core/usb.c Tue May 18 09:34:41 2004 +++ b/drivers/usb/core/usb.c Tue May 18 09:34:41 2004 @@ -1483,7 +1483,7 @@ return 0; } -void usb_uninterruptible_sleep_ms(int msecs) +void usb_uninterruptible_sleep_ms(unsigned int msecs) { long timeout = msecs_to_jiffies(msecs); diff -Nru a/include/linux/usb.h b/include/linux/usb.h --- a/include/linux/usb.h Tue May 18 09:34:41 2004 +++ b/include/linux/usb.h Tue May 18 09:34:41 2004 @@ -31,7 +31,7 @@ mdelay(ms); } -void usb_uninterruptible_sleep_ms(int msecs); +void usb_uninterruptible_sleep_ms(unsigned int msecs); struct usb_device; struct usb_driver; =================================================================== This BitKeeper patch contains the following changesets: 1.1729 ## Wrapped with gzip_uu ## M'XL( )&\J4 \V5:V^;,!2&/\>_PE*_;*H"QQ<P,&7JUD[;M$F+LO5S!.8L MH'*),'2=Q(^?0]HF:W/1HFD:()#PT<OC\[XV9_3:8!.-ZB*_Q8:<T0^U::-1 M&>L$V\RIL+OI2J=N%G9H5M=VR,WJ$MUUO?NM031ND5>=X1ZQ-=.XU1FU0R8: M,4<\OFE_+C$:S=Z]O_[\9D;(9$(OL[A:X%=LZ61"VKJYC8O47,1M5M25TS9Q M94IL8T?79?]8VG, ;D^/*0&>WS,?I.HU2QF+)<,4N Q\2=9P%\\G\;N2M#H! M*.9QV0O/]QFYHLQABH<4I N>RP(*821$),4Y\ B [E6FYYR.@;RE?W<FET33 M,>T,TJXR^:+"E'RBEC609+KI(!G_X4$(Q$!>'X'-*UUT*0[VWKF=29QL&SN4 MO&? !>]%&H9"::%M+X, ON]OTS[->RN$$*H'$7K\*%S:K#YA5A*#C-Y"D\!4 M+ST>!GTB420\8*&'/A=Q>@!M6U'7#6YDM^FD"D$- =Y=?SS-)Y(?2/5A<F65 M)026')A<1]SWGB9<J.,)9W3,_DW"UTW^0L?-C^&RB9WNZ?<)V;]B]LN4D8_W MS]LZ3RU!,N^JO&JQ:;IEFR<%SDV!N)R7YL4#&K7CM#2HS<LA CO2?-S_DY?5 [EMAIL PROTECTED]<6%8/]H-U(5S;#\\VN/_+_F$#>.+^CAF>8KV0*^.'^TFVO]K\Y'2&^L9T 1Y210+&9*(?D%"56/%TT' ------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel