Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753380AbZCIPee (ORCPT ); Mon, 9 Mar 2009 11:34:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751454AbZCIPe0 (ORCPT ); Mon, 9 Mar 2009 11:34:26 -0400 Received: from az33egw02.freescale.net ([192.88.158.103]:57730 "EHLO az33egw02.freescale.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378AbZCIPeZ (ORCPT ); Mon, 9 Mar 2009 11:34:25 -0400 Message-ID: <49B536F4.9060609@freescale.com> Date: Mon, 09 Mar 2009 10:34:12 -0500 From: Timur Tabi User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: Will Newton CC: linux-kernel@vger.kernel.org, rdreier@cisco.com, jirislaby@gmail.com Subject: Re: [PATCH v2] add function spin_event_timeout() References: <1236611904-9843-1-git-send-email-timur@freescale.com> <87a5b0800903090831l6a74b8afhd640ce880be36114@mail.gmail.com> In-Reply-To: <87a5b0800903090831l6a74b8afhd640ce880be36114@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 679 Lines: 20 Will Newton wrote: > Are you sure you want to evaluate condition a second time when > returning? Some memory mapped registers don't have a stable value so > e.g. the first test could succeed but the return value could still be > zero. Ah, good point. I was hoping to keep the loop simple by combining the two test conditions, but I guess that's not going to work. v3 coming up. -- Timur Tabi Linux kernel developer at Freescale -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/