mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jeff Chua <jeff.chua.linux@gmail.com>
Cc: Johannes Berg <johannes.berg@intel.com>,
	Arjan van de Ven <arjan@linux.intel.com>,
	"johnstul@us.ibm.com" <johnstul@us.ibm.com>,
	Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Intel Linux Wireless <ilw@linux.intel.com>,
	"John W. Linville" <linville@tuxdriver.com>,
	Frans Pop <elendil@planet.nl>,
	"Chatre, Reinette" <reinette.chatre@intel.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: Wireless IBSS on Linux-2.6.34 broken by commit 3bbb9ec946428b96657126768f65487a48dd090c
Date: Mon, 24 May 2010 07:57:02 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.00.1005240754130.3689@i5.linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1005240710460.3159@boston.corp.fedex.com>



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

  reply	other threads:[~2010-05-24 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-23 23:16 Jeff Chua
2010-05-24 14:57 ` Linus Torvalds [this message]
2010-05-25 18:37   ` Thomas Gleixner
  -- strict thread matches above, loose matches on Subject: below --
2010-05-24 22:48 Jeff Chua
2010-05-23 17:07 Jeff Chua
2010-05-23  4:58 Jeff Chua
2010-05-23  6:21 ` Arjan van de Ven
2010-05-23  9:49 ` Johannes Berg
2010-05-23 13:19   ` Jeff Chua

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.1005240754130.3689@i5.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@linux.intel.com \
    --cc=elendil@planet.nl \
    --cc=ilw@linux.intel.com \
    --cc=jeff.chua.linux@gmail.com \
    --cc=johannes.berg@intel.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mingo@elte.hu \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®