[PATCH 1/5] ifb: remove function declarations

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Changli Gao
Date: Monday, December 13, 2010 - 7:43 am

Restructure to remove function declarations.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 drivers/net/ifb.c |   51 +++++++++++++++++++++++----------------------------
 1 file changed, 23 insertions(+), 28 deletions(-)
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index bfa03db..0667a61 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -46,11 +46,6 @@ struct ifb_private {
 
 static int numifbs = 2;
 
-static void ri_tasklet(unsigned long dev);
-static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev);
-static int ifb_open(struct net_device *dev);
-static int ifb_close(struct net_device *dev);
-
 static void ri_tasklet(unsigned long dev)
 {
 
@@ -119,29 +114,6 @@ resched:
 
 }
 
-static const struct net_device_ops ifb_netdev_ops = {
-	.ndo_open	= ifb_open,
-	.ndo_stop	= ifb_close,
-	.ndo_start_xmit	= ifb_xmit,
-	.ndo_validate_addr = eth_validate_addr,
-};
-
-static void ifb_setup(struct net_device *dev)
-{
-	/* Initialize the device structure. */
-	dev->destructor = free_netdev;
-	dev->netdev_ops = &ifb_netdev_ops;
-
-	/* Fill in device structure with ethernet-generic values. */
-	ether_setup(dev);
-	dev->tx_queue_len = TX_Q_LIMIT;
-
-	dev->flags |= IFF_NOARP;
-	dev->flags &= ~IFF_MULTICAST;
-	dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
-	random_ether_addr(dev->dev_addr);
-}
-
 static netdev_tx_t ifb_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 	struct ifb_private *dp = netdev_priv(dev);
@@ -193,6 +165,29 @@ static int ifb_open(struct net_device *dev)
 	return 0;
 }
 
+static const struct net_device_ops ifb_netdev_ops = {
+	.ndo_open		= ifb_open,
+	.ndo_stop		= ifb_close,
+	.ndo_start_xmit		= ifb_xmit,
+	.ndo_validate_addr	= eth_validate_addr,
+};
+
+static void ifb_setup(struct net_device *dev)
+{
+	/* Initialize the device structure. */
+	dev->destructor = free_netdev;
+	dev->netdev_ops = &ifb_netdev_ops;
+
+	/* Fill in device structure with ethernet-generic values. */
+	ether_setup(dev);
+	dev->tx_queue_len = TX_Q_LIMIT;
+
+	dev->flags |= IFF_NOARP;
+	dev->flags &= ~IFF_MULTICAST;
+	dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
+	random_ether_addr(dev->dev_addr);
+}
+
 static int ifb_validate(struct nlattr *tb[], struct nlattr *data[])
 {
 	if (tb[IFLA_ADDRESS]) {
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/5] ifb: remove function declarations, Changli Gao, (Mon Dec 13, 7:43 am)
[PATCH 2/5] ifb: code cleanup, Changli Gao, (Mon Dec 13, 7:43 am)
[PATCH 3/5] ifb: fix tx_queue_len overlimit, Changli Gao, (Mon Dec 13, 7:43 am)
[PATCH 4/5] ifb: add multiqueue support, Changli Gao, (Mon Dec 13, 7:43 am)
[PATCH 5/5] net: add skb.old_queue_mapping, Changli Gao, (Mon Dec 13, 7:43 am)
Re: [PATCH 4/5] ifb: add multiqueue support, Eric Dumazet, (Mon Dec 13, 9:26 am)
Re: [PATCH 5/5] net: add skb.old_queue_mapping, Eric Dumazet, (Mon Dec 13, 9:56 am)
Re: [PATCH 4/5] ifb: add multiqueue support, Eric Dumazet, (Mon Dec 13, 10:05 am)
Re: [PATCH 5/5] net: add skb.old_queue_mapping, David Miller, (Mon Dec 13, 10:58 am)
Re: [PATCH 4/5] ifb: add multiqueue support, Changli Gao, (Mon Dec 13, 4:42 pm)
Re: [PATCH 4/5] ifb: add multiqueue support, Changli Gao, (Mon Dec 13, 4:46 pm)
Re: [PATCH 5/5] net: add skb.old_queue_mapping, Changli Gao, (Mon Dec 13, 4:58 pm)
Re: [PATCH 5/5] net: add skb.old_queue_mapping, Changli Gao, (Tue Dec 14, 7:59 pm)
Re: [PATCH 2/5] ifb: code cleanup, jamal, (Wed Dec 15, 5:32 am)
Re: [PATCH 4/5] ifb: add multiqueue support, jamal, (Wed Dec 15, 5:34 am)
Re: [PATCH 3/5] ifb: fix tx_queue_len overlimit, Changli Gao, (Wed Dec 15, 5:36 am)
Re: [PATCH 5/5] net: add skb.old_queue_mapping, Changli Gao, (Wed Dec 15, 5:52 am)