net-bonding: Fix minor sparse complaints
authorDavid Decotigny <decot@google.com>
Wed, 13 Apr 2011 15:22:29 +0000 (15:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Apr 2011 05:00:31 +0000 (22:00 -0700)
This gets rid of minor sparse complaints:
drivers/net/bonding/bond_main.c:4361:4: warning: do-while statement is not a compound statement
drivers/net/bonding/bond_main.c:243:12: warning: symbol 'bond_mode_name' was not declared. Should it be static?

Signed-off-by: David Decotigny <decot@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_procfs.c
drivers/net/bonding/bonding.h

index b51e021354b536430ec0260b2a4f5e09d675dbd2..94a371c12d707ba2b497c8aab35f5082815d1748 100644 (file)
@@ -4357,9 +4357,9 @@ static u16 bond_select_queue(struct net_device *dev, struct sk_buff *skb)
        u16 txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : 0;
 
        if (unlikely(txq >= dev->real_num_tx_queues)) {
-               do
+               do {
                        txq -= dev->real_num_tx_queues;
-               while (txq >= dev->real_num_tx_queues);
+               while (txq >= dev->real_num_tx_queues);
        }
        return txq;
 }
index c32ff55a34c1e2331d05995d0626ff3dbc0ab418..c97307ddd1c95578a7afbe92cfc79723276f09d6 100644 (file)
@@ -4,8 +4,6 @@
 #include "bonding.h"
 
 
-extern const char *bond_mode_name(int mode);
-
 static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
        __acquires(RCU)
        __acquires(&bond->lock)
index 90736cb4d975140c16b03fe2d72a4921e0abf477..3ca503e507188f3c2ec2dac119d82c1043c6c4e0 100644 (file)
@@ -416,6 +416,7 @@ void bond_destroy_debugfs(void);
 void bond_debug_register(struct bonding *bond);
 void bond_debug_unregister(struct bonding *bond);
 void bond_debug_reregister(struct bonding *bond);
+const char *bond_mode_name(int mode);
 
 struct bond_net {
        struct net *            net;    /* Associated network namespace */