From: Herbert Xu <[EMAIL PROTECTED]> Date: Thu, 02 Feb 2006 09:06:34 +1100
> Ian McDonald <[EMAIL PROTECTED]> wrote: > > On 2/1/06, Herbert Xu <[EMAIL PROTECTED]> wrote: > >> Ian McDonald <[EMAIL PROTECTED]> wrote: > >> > > >> > --- a/net/core/sock.c > >> > +++ b/net/core/sock.c > >> > @@ -162,7 +162,8 @@ static int sock_set_timeout(long *timeo_ > >> > if (tv.tv_sec == 0 && tv.tv_usec == 0) > >> > return 0; > >> > if (tv.tv_sec < (MAX_SCHEDULE_TIMEOUT/HZ - 1)) > >> > - *timeo_p = tv.tv_sec*HZ + > >> > (tv.tv_usec+(1000000/HZ-1))/(1000000/HZ); > >> > + *timeo_p = tv.tv_sec*HZ + > >> > + > >> > (tv.tv_usec+(USEC_PER_SEC/HZ-1))/(USEC_PER_SEC/HZ); > >> > >> Is there a macro for this calculation? If not could we add one? > >> > > I don't know if there is or not. There is similar code in DCCP. I > > I just had a look and usecs_to_jiffies seems to do what you want. Ian, can you redo your patch using usecs_to_jiffies? Thanks. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html