]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Fix up broken do while macros.
authorDave Jones <davej@suse.de>
Wed, 3 Apr 2002 03:21:43 +0000 (19:21 -0800)
committerDave Jones <davej@suse.de>
Wed, 3 Apr 2002 03:21:43 +0000 (19:21 -0800)
24 files changed:
arch/mips/kernel/signal.c
arch/mips/sni/pci.c
arch/ppc/math-emu/op-4.h
arch/sparc/mm/srmmu.c
arch/sparc/mm/sun4c.c
arch/sparc64/kernel/binfmt_elf32.c
drivers/char/applicom.c
drivers/char/drm/i810_dma.c
drivers/isdn/avmb1/kcapi.c
drivers/s390/block/dasd_int.h
include/asm-arm/arch-cl7500/system.h
include/asm-arm/arch-sa1100/keyboard.h
include/asm-mips/spinlock.h
include/asm-mips64/spinlock.h
include/asm-parisc/pgalloc.h
include/asm-sparc/elf.h
include/linux/mtd/compatmac.h
include/linux/rtnetlink.h
include/net/sock.h
include/net/tcp.h
net/ipv4/netfilter/ip_fw_compat_redir.c
net/ipv4/netfilter/ip_queue.c
net/ipv4/netfilter/ipt_ULOG.c
net/ipv6/netfilter/ip6_queue.c

index 5a05734843a0ead63a6c5d3f162fbe22f5d433c5..b5ad2cc6015a4ddac0798e5f49873e781bfca6db 100644 (file)
@@ -204,7 +204,7 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
 #define restore_gp_reg(i) do {                                         \
        err |= __get_user(reg, &sc->sc_regs[i]);                        \
        regs->regs[i] = reg;                                            \
-} while(0);
+} while(0)
        restore_gp_reg( 1); restore_gp_reg( 2); restore_gp_reg( 3);
        restore_gp_reg( 4); restore_gp_reg( 5); restore_gp_reg( 6);
        restore_gp_reg( 7); restore_gp_reg( 8); restore_gp_reg( 9);
index 00a3d186d7e3cf2f01193bcb719b538e4861e907..080324211391ea46edf86a5d3a6b59e314b3d0ae 100644 (file)
@@ -25,7 +25,7 @@ do {                                                                         \
                 ((dev->bus->number    & 0xff) << 0x10) |                    \
                 ((dev->devfn & 0xff) << 0x08) |                             \
                 (where  & 0xfc);                                            \
-} while(0);
+} while(0)
 
 #if 0
 /* To do:  Bring this uptodate ...  */
index 3458d78708929b3bf117bc8d2979955a23acad46..5da9921eab8a4c0e1612dc3bcfbabe4c5f7c5a7d 100644 (file)
     X##_f[1] = (rsize <= _FP_W_TYPE_SIZE ? 0 : r >> _FP_W_TYPE_SIZE);   \
     X##_f[2] = (rsize <= 2*_FP_W_TYPE_SIZE ? 0 : r >> 2*_FP_W_TYPE_SIZE); \
     X##_f[3] = (rsize <= 3*_FP_W_TYPE_SIZE ? 0 : r >> 3*_FP_W_TYPE_SIZE); \
-  } while (0);
+  } while (0)
 
 #define _FP_FRAC_CONV_4_1(dfs, sfs, D, S)                               \
    do {                                                                 \
index e0ada910547013439e8a1fd12df3e8b8c8f4025f..bd0292118fc09057d38b35fd3fe146e234d2792c 100644 (file)
@@ -1963,7 +1963,7 @@ extern unsigned long srmmu_fault;
                iaddr = &(insn); \
                daddr = &(dest); \
                *iaddr = SPARC_BRANCH((unsigned long) daddr, (unsigned long) iaddr); \
-       } while(0);
+       } while(0)
 
 static void __init patch_window_trap_handlers(void)
 {
index f06384045afe85533144feec5c31d95dc31e792a..65836301aede4ec6af9e2f6e496988be77ffd48e 100644 (file)
@@ -425,7 +425,7 @@ extern unsigned long vac_hwflush_patch2, vac_hwflush_patch2_on;
                daddr = &(dst);         \
                iaddr = &(src);         \
                *daddr = *iaddr;        \
-       } while (0);
+       } while (0)
 
 static void patch_kernel_fault_handler(void)
 {
index 5b742bc444fce4544cb652d559616dac9c3fc41c..cbe01f5b1271cf2f7bb00cb429a9070f2685ecbd 100644 (file)
@@ -43,7 +43,7 @@ do {  unsigned int *dest = &(__elf_regs[0]);          \
        dest[34] = (unsigned int) src->tnpc;            \
        dest[35] = src->y;                              \
        dest[36] = dest[37] = 0; /* XXX */              \
-} while(0);
+} while(0)
 
 typedef struct {
        union {
index fe21688ca37fd2ccad620166c1843eddeb78eb20..9db606a2a9c98f56f9ac25b42193b74aa1243080 100644 (file)
@@ -36,7 +36,7 @@
 
 #if LINUX_VERSION_CODE < 0x20300 
 /* These probably want adding to <linux/compatmac.h> */
-#define init_waitqueue_head(x) do { *(x) = NULL; } while (0);
+#define init_waitqueue_head(x) do { *(x) = NULL; } while (0)
 #define PCI_BASE_ADDRESS(dev) (dev->base_address[0])
 #define DECLARE_WAIT_QUEUE_HEAD(x) struct wait_queue *x
 #define __setup(x,y) /* */
index 8629e0e5fa093feeac4a2f215399bef4cc587e34..86a97333cb7fa301f22c6f186eaabf15277e173e 100644 (file)
@@ -73,7 +73,7 @@
        *(volatile unsigned int *)(virt + outring) = n;                 \
        outring += 4;                                                   \
        outring &= ringmask;                                            \
-} while (0);
+} while (0)
 
 static inline void i810_print_status_page(drm_device_t *dev)
 {
index 6ef1f9f33db62c0558832a31303957a49b9c6c22..5f6e530b1149125c5d4eacbb9e662fbee27fafff 100644 (file)
@@ -102,8 +102,8 @@ static char capi_manufakturer[64] = "AVM Berlin";
 #define APPL(a)                   (&applications[(a)-1])
 #define        VALID_APPLID(a)    ((a) && (a) <= CAPI_MAXAPPL && APPL(a)->applid == a)
 #define APPL_IS_FREE(a)    (APPL(a)->applid == 0)
-#define APPL_MARK_FREE(a)  do{ APPL(a)->applid=0; MOD_DEC_USE_COUNT; }while(0);
-#define APPL_MARK_USED(a)  do{ APPL(a)->applid=(a); MOD_INC_USE_COUNT; }while(0);
+#define APPL_MARK_FREE(a)  do{ APPL(a)->applid=0; MOD_DEC_USE_COUNT; }while(0)
+#define APPL_MARK_USED(a)  do{ APPL(a)->applid=(a); MOD_INC_USE_COUNT; }while(0)
 
 #define NCCI2CTRL(ncci)    (((ncci) >> 24) & 0x7f)
 
index bb14996daf66170781094f3dda6ea9791b2fb0d1..c0278e300cd8d0ae0f56a20ce8ee892304ee0860 100644 (file)
@@ -201,14 +201,14 @@ do {\
         debug_sprintf_event(d_device->debug_area,d_level,\
                     DASD_DEVICE_FORMAT_STRING d_str "\n",\
                     d_device, d_data);\
-} while(0);
+} while(0)
 #define DASD_DEVICE_DEBUG_EXCEPTION(d_level, d_device, d_str, d_data...)\
 do {\
         if ( d_device->debug_area != NULL )\
         debug_sprintf_exception(d_device->debug_area,d_level,\
                         DASD_DEVICE_FORMAT_STRING d_str "\n",\
                         d_device, d_data);\
-} while(0);
+} while(0)
 
 #define DASD_DRIVER_FORMAT_STRING "Driver: <[%p]>"
 #define DASD_DRIVER_DEBUG_EVENT(d_level, d_fn, d_str, d_data...)\
@@ -217,14 +217,14 @@ do {\
         debug_sprintf_event(dasd_debug_area, d_level,\
                     DASD_DRIVER_FORMAT_STRING #d_fn ":" d_str "\n",\
                     d_fn, d_data);\
-} while(0);
+} while(0)
 #define DASD_DRIVER_DEBUG_EXCEPTION(d_level, d_fn, d_str, d_data...)\
 do {\
         if ( dasd_debug_area != NULL )\
         debug_sprintf_exception(dasd_debug_area, d_level,\
                         DASD_DRIVER_FORMAT_STRING #d_fn ":" d_str "\n",\
                         d_fn, d_data);\
-} while(0);
+} while(0)
 
 struct dasd_device_t;
 struct request;
index 6cb0021948345145acce7876b36041d1d2e7996c..fee569dd0303b69455b29daa4b8cc16b523f5397 100644 (file)
@@ -18,6 +18,6 @@ static void arch_idle(void)
        do {                                    \
                iomd_writeb(0, IOMD_ROMCR0);    \
                cpu_reset(0);                   \
-       } while (0);
+       } while (0)
 
 #endif
index 0207ba65ed6e2ded234386a779e03e95163596ba..aa7f317092e52136789c6db00b79c0a2897b03f1 100644 (file)
@@ -10,8 +10,8 @@
 #include <asm/mach-types.h>
 #include <asm/arch/assabet.h>
 
-#define kbd_disable_irq()      do { } while(0);
-#define kbd_enable_irq()       do { } while(0);
+#define kbd_disable_irq()      do { } while(0)
+#define kbd_enable_irq()       do { } while(0)
 
 extern int sa1111_kbd_init_hw(void);
 extern void gc_kbd_init_hw(void);
index 61ebfa6603eb9cd3722df18e588d3adea819dfbd..fb02686f7896497c0b7db9d3eef0433310ab7917 100644 (file)
@@ -19,10 +19,10 @@ typedef struct {
 
 #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
 
-#define spin_lock_init(x)      do { (x)->lock = 0; } while(0);
+#define spin_lock_init(x)      do { (x)->lock = 0; } while(0)
 
 #define spin_is_locked(x)      ((x)->lock != 0)
-#define spin_unlock_wait(x)    ({ do { barrier(); } while ((x)->lock); })
+#define spin_unlock_wait(x)    do { barrier(); } while ((x)->lock)
 
 /*
  * Simple spin lock operations.  There are two variants, one clears IRQ's
index 7e560d4c05a4650c87d05f97e917721eb314f29a..9ce6c6c2e13cbbca5dbb4be0ecc8ad48ce0e63ee 100644 (file)
@@ -19,10 +19,10 @@ typedef struct {
 
 #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 }
 
-#define spin_lock_init(x)      do { (x)->lock = 0; } while(0);
+#define spin_lock_init(x)      do { (x)->lock = 0; } while(0)
 
 #define spin_is_locked(x)      ((x)->lock != 0)
-#define spin_unlock_wait(x)    ({ do { barrier(); } while ((x)->lock); })
+#define spin_unlock_wait(x)    do { barrier(); } while ((x)->lock)
 
 /*
  * Simple spin lock operations.  There are two variants, one clears IRQ's
index b29fa8aef9be4ed5f6db6c37e0739f7def0e8639..37e7511bedd7a83f3444748c57d2c5a07c6c310a 100644 (file)
@@ -123,7 +123,7 @@ extern void flush_instruction_tlb(void);
 #define flush_tlb() do { \
         flush_data_tlb(); \
        flush_instruction_tlb(); \
-} while(0);
+} while(0)
 
 #define flush_tlb_all()        flush_tlb()     /* XXX p[id]tlb */
 
index 436d1a9ad56b7abb57660b0fb60700fe5d0d7156..d6e8a340495d4226dc737f4af01a234f12a7d128 100644 (file)
@@ -41,7 +41,7 @@ do {  unsigned long *dest = &(__elf_regs[0]);         \
        dest[34] = src->npc;                            \
        dest[35] = src->y;                              \
        dest[36] = dest[37] = 0; /* XXX */              \
-} while(0);
+} while(0)
 
 typedef struct {
        union {
index e6844448c327bece8da7b5782a8020cae1040f8c..9c9a2276f57e4b9c03b91515d5dcd19ee5d6a229 100644 (file)
@@ -190,8 +190,8 @@ static inline int try_inc_mod_count(struct module *mod)
 
 #if LINUX_VERSION_CODE < 0x20300
 #include <linux/interrupt.h>
-#define spin_lock_bh(lock) do {start_bh_atomic();spin_lock(lock);}while(0);
-#define spin_unlock_bh(lock) do {spin_unlock(lock);end_bh_atomic();}while(0);
+#define spin_lock_bh(lock) do {start_bh_atomic();spin_lock(lock);} while(0)
+#define spin_unlock_bh(lock) do {spin_unlock(lock);end_bh_atomic();} while(0)
 #else
 #include <asm/softirq.h>
 #include <linux/spinlock.h>
index b0778a2d45e77aa6c8b0e878a83e56951c0a8324..3854002c7eec3e2975670811fac32c064fb4cb45 100644 (file)
@@ -589,7 +589,7 @@ extern void rtnetlink_init(void);
 
 #define ASSERT_RTNL() do { if (down_trylock(&rtnl_sem) == 0)  { up(&rtnl_sem); \
 printk("RTNL: assertion failed at " __FILE__ "(%d)\n", __LINE__); } \
-                  } while(0);
+                  } while(0)
 #define BUG_TRAP(x) if (!(x)) { printk("KERNEL: assertion (" #x ") failed at " __FILE__ "(%d)\n", __LINE__); }
 
 
index d50815f55ff35e066ff6366d7dfbce6cb9386bcf..57159c6ce0bd4adeac4c39f11b1f507119508d30 100644 (file)
@@ -80,7 +80,7 @@ typedef struct {
 do {   spin_lock_init(&((__sk)->lock.slock)); \
        (__sk)->lock.users = 0; \
        init_waitqueue_head(&((__sk)->lock.wq)); \
-} while(0);
+} while(0)
 
 struct sock {
        /* Begin of struct sock/struct tcp_tw_bucket shared layout */
index e35e419a340535bcb6c8f12408ffe3b0d5c4ebc4..1e7cf2cdce474941da44482fc2675ca2f036929d 100644 (file)
@@ -1832,6 +1832,6 @@ static inline int tcp_paws_check(struct tcp_opt *tp, int rst)
        return 1;
 }
 
-#define TCP_CHECK_TIMER(sk) do { } while (0);
+#define TCP_CHECK_TIMER(sk) do { } while (0)
 
 #endif /* _TCP_H */
index 1b11391683e190c4d3728d53a7b05e429dce6a68..0540d87e1134af5b33720a4f6a29d6edd1c89886 100644 (file)
@@ -43,7 +43,7 @@ do {                                                                   \
                   netplay... */                                         \
                printk("ASSERT: %s:%i(%s)\n",                            \
                       __FILE__, __LINE__, __FUNCTION__);                \
-} while(0);
+} while(0)
 #else
 #define IP_NF_ASSERT(x)
 #endif
index 0894fc63c7a251b20f5ad53b47d46135c6d18bc6..e9932533f87addef3807c3dbe46104b7f5c70229 100644 (file)
@@ -464,7 +464,7 @@ static int netlink_send_peer(ipq_queue_element_t *e)
        return netlink_unicast(nfnl, skb, nlq->peer.pid, MSG_DONTWAIT);
 }
 
-#define RCV_SKB_FAIL(err) do { netlink_ack(skb, nlh, (err)); return; } while (0);
+#define RCV_SKB_FAIL(err) do { netlink_ack(skb, nlh, (err)); return; } while (0)
 
 static __inline__ void netlink_receive_user_skb(struct sk_buff *skb)
 {
index a978874f484964dfdf0de70518488bf959ec2b61..3f5e6b074854809e9ecf3c74b9e053417b8f959f 100644 (file)
@@ -61,7 +61,7 @@ MODULE_LICENSE("GPL");
 #define DEBUGP(format, args...)
 #endif
 
-#define PRINTR(format, args...) do { if (net_ratelimit()) printk(format, ## args); } while (0);
+#define PRINTR(format, args...) do { if (net_ratelimit()) printk(format, ## args); } while (0)
 
 MODULE_AUTHOR("Harald Welte <laforge@gnumonks.org>");
 MODULE_DESCRIPTION("IP tables userspace logging module");
index 235533afd4fe9fde3a6839811fdde2fa9bdd5502..07e58857d77750b0251df49ed2bf5069572cc628 100644 (file)
@@ -518,7 +518,7 @@ static int netlink_send_peer(ip6q_queue_element_t *e)
        return netlink_unicast(nfnl, skb, nlq6->peer.pid, MSG_DONTWAIT);
 }
 
-#define RCV_SKB_FAIL(err) do { netlink_ack(skb, nlh, (err)); return; } while (0);
+#define RCV_SKB_FAIL(err) do { netlink_ack(skb, nlh, (err)); return; } while (0)
 
 static __inline__ void netlink_receive_user_skb(struct sk_buff *skb)
 {