netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] net-bonding: Fix minor sparse complaints
@ 2011-04-14  1:22 David Decotigny
  2011-04-14  1:22 ` [PATCH 2/3] net-bonding: Fix minor/cosmetic type inconsistencies David Decotigny
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: David Decotigny @ 2011-04-14  1:22 UTC (permalink / raw)
  To: Jay Vosburgh, Andy Gospodarek, netdev, linux-kernel; +Cc: David Decotigny

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>
---
 drivers/net/bonding/bond_main.c   |    4 ++--
 drivers/net/bonding/bond_procfs.c |    2 --
 drivers/net/bonding/bonding.h     |    1 +
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 16d6fe9..8264ed7 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -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;
 }
diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
index c32ff55..c97307d 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -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)
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index 90736cb..3ca503e 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -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 */
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-04-15  5:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-14  1:22 [PATCH 1/3] net-bonding: Fix minor sparse complaints David Decotigny
2011-04-14  1:22 ` [PATCH 2/3] net-bonding: Fix minor/cosmetic type inconsistencies David Decotigny
2011-04-15  5:04   ` David Miller
2011-04-14  1:22 ` [PATCH 3/3] net-bonding: Adding support for throughputs larger than 65536 Mbps David Decotigny
2011-04-15  5:04   ` David Miller
2011-04-15  5:03 ` [PATCH 1/3] net-bonding: Fix minor sparse complaints David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).