Re: [tip:timers/urgent] timers: Fix slack calculation really

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 25 May 2010, tip-bot for Thomas Gleixner wrote:
>  {
> -	unsigned long expires_limit, mask;
> +	unsigned long expires_limit, mask, now;
>  	int bit;
>  
>  	expires_limit = expires;
>  
> -	if (timer->slack > -1)
> +	if (timer->slack >= 0) {
>  		expires_limit = expires + timer->slack;
> -	else if (time_after(expires, jiffies)) /* auto slack: use 0.4% */
> -		expires_limit = expires + (expires - jiffies)/256;
> -
> +	} else {
> +		now = jiffies;

So this works, but I'd really suggest that you actually nest the 
declarations correctly too. 

		Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux