lkml.org 
[lkml]   [2010]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Wireless IBSS on Linux-2.6.34 broken by commit 3bbb9ec946428b96657126768f65487a48dd090c


On Mon, 24 May 2010, Jeff Chua wrote:
>
> - expires_limit = expires + timer->slack;
> + expires_limit = expires;
>
> - if (timer->slack < 0) /* auto slack: use 0.4% */
> + if (timer->slack > -1)
> + expires_limit = expires + timer->slack;
> + else if (time_after(expires, jiffies)) /* auto slack: use 0.4% */
> expires_limit = expires + (expires - jiffies)/256;

Please don't reload 'jiffies' twice. It's volatile, and the compiler will
do a crap job of it.

Also, '0' is a normal number, but '-1' is a rather odd value. Please just
test for non-negative by doing ">= 0" rather than "> -1"

Linus


\
 
 \ /
  Last update: 2010-05-24 17:03    [W:0.042 / U:0.508 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site