From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753791Ab0EXPAo (ORCPT ); Mon, 24 May 2010 11:00:44 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:52963 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752058Ab0EXPAn (ORCPT ); Mon, 24 May 2010 11:00:43 -0400 Date: Mon, 24 May 2010 07:57:02 -0700 (PDT) From: Linus Torvalds To: Jeff Chua cc: Johannes Berg , Arjan van de Ven , "johnstul@us.ibm.com" , Ingo Molnar , Andrew Morton , Thomas Gleixner , Intel Linux Wireless , "John W. Linville" , Frans Pop , "Chatre, Reinette" , lkml Subject: Re: Wireless IBSS on Linux-2.6.34 broken by commit 3bbb9ec946428b96657126768f65487a48dd090c In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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