Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965010AbXBLQ7H (ORCPT ); Mon, 12 Feb 2007 11:59:07 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965008AbXBLQ5P (ORCPT ); Mon, 12 Feb 2007 11:57:15 -0500 Received: from cantor2.suse.de ([195.135.220.15]:53624 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964991AbXBLQvh (ORCPT ); Mon, 12 Feb 2007 11:51:37 -0500 From: Andi Kleen Message-Id: <20070212551.664370000@suse.de> To: Randy Dunlap , Andi Kleen , Christoph Hellwig , Segher Boessenkool , patches@x86-64.org, linux-kernel@vger.kernel.org Subject: [PATCH x86 for review III] [1/29] i386: avoid gcc extension Date: Mon, 12 Feb 2007 17:51:20 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1618 Lines: 43 From: Randy Dunlap setcc() in math-emu is written as a gcc extension statement expression macro that returns a value. However, it's not used that way and it's not needed like that, so just make it a do-while non-extension macro so that we don't use an extension when it's not needed. Signed-off-by: Randy Dunlap Signed-off-by: Andi Kleen Cc: Andi Kleen Cc: Christoph Hellwig Cc: Segher Boessenkool Signed-off-by: Andrew Morton --- arch/i386/math-emu/status_w.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) Index: linux/arch/i386/math-emu/status_w.h =================================================================== --- linux.orig/arch/i386/math-emu/status_w.h +++ linux/arch/i386/math-emu/status_w.h @@ -48,9 +48,11 @@ #define status_word() \ ((partial_status & ~SW_Top & 0xffff) | ((top << SW_Top_Shift) & SW_Top)) -#define setcc(cc) ({ \ - partial_status &= ~(SW_C0|SW_C1|SW_C2|SW_C3); \ - partial_status |= (cc) & (SW_C0|SW_C1|SW_C2|SW_C3); }) +static inline void setcc(int cc) +{ + partial_status &= ~(SW_C0|SW_C1|SW_C2|SW_C3); + partial_status |= (cc) & (SW_C0|SW_C1|SW_C2|SW_C3); +} #ifdef PECULIAR_486 /* Default, this conveys no information, but an 80486 does it. */ - 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/