From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH V4 1/5] The macro spin_event_timeout() takes a condition and timeout value Date: Tue, 26 May 2009 13:49:48 +0100 Message-ID: <200905261349.49832.arnd@arndb.de> References: <20090525221406.21370.30326.stgit@terra> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@ozlabs.org Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@ozlabs.org To: linuxppc-dev@ozlabs.org Cc: Geert Uytterhoeven , alsa-devel@alsa-project.org, Timur Tabi , broonie@sirena.org.uk List-Id: alsa-devel@alsa-project.org On Tuesday 26 May 2009, Geert Uytterhoeven wrote: > However, you can still improve useability by making the macro return the rc, > instead of letting the caller pass it, cfr. wait_event_timeout() and friends. Either that, or it should at least use the do { ... } while (0) construct to make the macro a statement. All multi-line macros need to either use ({ ... }) or do { ... } while (0) to make sure they behave well. Arnd <><