lkml.org 
[lkml]   [2015]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] irda: irda-usb: use msecs_to_jiffies for conversions
From
Date
On Tue, 2015-05-19 at 18:44 -0700, Guenter Roeck wrote:
> On Tue, May 19, 2015 at 02:09:07PM -0700, Joe Perches wrote:
> > The other thing that could be done is to use
> > max(1ul, msecs_to_jiffies())
> > so that there's always some delay even if HZ <= 50
> >
> I may be mistaken, but I am quite sure that msecs_to_jiffies() always returns
> at least 1 in such situations. Otherwise there would be lots of conversions
> to 0 in the kernel.

Thanks Guenter

Nope, you're not mistaken.

Non 0 constants always return a value > 0

The existing uses like max(1ul, msecs_to_jiffies(<variable>))
just guard against <variable> being 0.




\
 
 \ /
  Last update: 2015-05-20 06:01    [W:0.055 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site