[PATCH] drivers/net/smc9194.h: add do {...} while(0) as appropriate

Denis Vlasenko (vda@port.imtp.ilyichevsk.odessa.ua)
Sun, 3 Nov 2002 14:34:57 -0200


diff -u --recursive linux-2.5.40org/drivers/net/smc9194.h linux-2.5.40/drivers/net/smc9194.h
--- linux-2.5.40org/drivers/net/smc9194.h Tue Oct 1 05:07:46 2002
+++ linux-2.5.40/drivers/net/smc9194.h Wed Oct 9 08:17:59 2002
@@ -201,31 +201,32 @@

/* select a register bank, 0 to 3 */

-#define SMC_SELECT_BANK(x) { outw( x, ioaddr + BANK_SELECT ); }
+#define SMC_SELECT_BANK(x) outw( x, ioaddr + BANK_SELECT )

/* define a small delay for the reset */
-#define SMC_DELAY() { inw( ioaddr + RCR );\
- inw( ioaddr + RCR );\
- inw( ioaddr + RCR ); }
+#define SMC_DELAY() do { inw( ioaddr + RCR );\
+ inw( ioaddr + RCR );\
+ inw( ioaddr + RCR );\
+} while(0)

/* this enables an interrupt in the interrupt mask register */
-#define SMC_ENABLE_INT(x) {\
+#define SMC_ENABLE_INT(x) do {\
unsigned char mask;\
SMC_SELECT_BANK(2);\
mask = inb( ioaddr + INT_MASK );\
mask |= (x);\
- outb( mask, ioaddr + INT_MASK ); \
-}
+ outb( mask, ioaddr + INT_MASK );\
+} while(0)

/* this disables an interrupt from the interrupt mask register */

-#define SMC_DISABLE_INT(x) {\
+#define SMC_DISABLE_INT(x) do {\
unsigned char mask;\
SMC_SELECT_BANK(2);\
mask = inb( ioaddr + INT_MASK );\
mask &= ~(x);\
- outb( mask, ioaddr + INT_MASK ); \
-}
+ outb( mask, ioaddr + INT_MASK );\
+} while(0)

/*----------------------------------------------------------------------
. Define the interrupts that I want to receive from the card
-
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/