From: Stephen Hemminger <shemminger@vyatta•com>
To: davem@davemloft•net
Cc: netdev@vger•kernel.org
Subject: [PATCH 3/6] sky2: rename up/down functions
Date: Wed, 16 Nov 2011 15:42:57 -0800 [thread overview]
Message-ID: <20111116234344.717497342@vyatta.com> (raw)
In-Reply-To: 20111116234254.319625694@vyatta.com
[-- Attachment #1: sky2-open-stop-rename.patch --]
[-- Type: text/plain, Size: 2639 bytes --]
The code is clearer if the up/down functions are renamed to
open/close like other drivers. Purely syntax change.
Signed-off-by: Stephen Hemminger <shemminger@vyatta•com>
--- a/drivers/net/ethernet/marvell/sky2.c 2011-11-16 15:19:38.282631277 -0800
+++ b/drivers/net/ethernet/marvell/sky2.c 2011-11-16 15:19:39.518659262 -0800
@@ -1728,7 +1728,7 @@ static int sky2_setup_irq(struct sky2_hw
/* Bring up network interface. */
-static int sky2_up(struct net_device *dev)
+static int sky2_open(struct net_device *dev)
{
struct sky2_port *sky2 = netdev_priv(dev);
struct sky2_hw *hw = sky2->hw;
@@ -2098,7 +2098,7 @@ static void sky2_hw_down(struct sky2_por
}
/* Network shutdown */
-static int sky2_down(struct net_device *dev)
+static int sky2_close(struct net_device *dev)
{
struct sky2_port *sky2 = netdev_priv(dev);
struct sky2_hw *hw = sky2->hw;
@@ -2601,7 +2601,7 @@ static inline void sky2_tx_done(struct n
if (netif_running(dev)) {
sky2_tx_complete(sky2, last);
- /* Wake unless it's detached, and called e.g. from sky2_down() */
+ /* Wake unless it's detached, and called e.g. from sky2_close() */
if (tx_avail(sky2) > MAX_SKB_TX_LE + 4)
netif_wake_queue(dev);
}
@@ -3391,7 +3391,7 @@ static void sky2_detach(struct net_devic
netif_tx_lock(dev);
netif_device_detach(dev); /* stop txq */
netif_tx_unlock(dev);
- sky2_down(dev);
+ sky2_close(dev);
}
}
@@ -3401,7 +3401,7 @@ static int sky2_reattach(struct net_devi
int err = 0;
if (netif_running(dev)) {
- err = sky2_up(dev);
+ err = sky2_open(dev);
if (err) {
netdev_info(dev, "could not restart %d\n", err);
dev_close(dev);
@@ -4570,7 +4570,7 @@ static int sky2_device_event(struct noti
struct net_device *dev = ptr;
struct sky2_port *sky2 = netdev_priv(dev);
- if (dev->netdev_ops->ndo_open != sky2_up || !sky2_debug)
+ if (dev->netdev_ops->ndo_open != sky2_open || !sky2_debug)
return NOTIFY_DONE;
switch (event) {
@@ -4635,8 +4635,8 @@ static __exit void sky2_debug_cleanup(vo
not allowing netpoll on second port */
static const struct net_device_ops sky2_netdev_ops[2] = {
{
- .ndo_open = sky2_up,
- .ndo_stop = sky2_down,
+ .ndo_open = sky2_open,
+ .ndo_stop = sky2_close,
.ndo_start_xmit = sky2_xmit_frame,
.ndo_do_ioctl = sky2_ioctl,
.ndo_validate_addr = eth_validate_addr,
@@ -4652,8 +4652,8 @@ static const struct net_device_ops sky2_
#endif
},
{
- .ndo_open = sky2_up,
- .ndo_stop = sky2_down,
+ .ndo_open = sky2_open,
+ .ndo_stop = sky2_close,
.ndo_start_xmit = sky2_xmit_frame,
.ndo_do_ioctl = sky2_ioctl,
.ndo_validate_addr = eth_validate_addr,
next prev parent reply other threads:[~2011-11-16 23:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 23:42 [PATCH 0/6] sky2 patches for net-next Stephen Hemminger
2011-11-16 23:42 ` [PATCH 1/6] sky2: fix hang on shutdown (and other irq issues) Stephen Hemminger
2011-11-17 8:46 ` Sven Joachim
2011-11-17 17:01 ` Stephen Hemminger
2011-11-17 18:37 ` Sven Joachim
2011-11-17 19:18 ` Stephen Hemminger
2011-11-17 20:57 ` Sven Joachim
2011-11-18 0:37 ` [PATCH net-next] sky2: fix hang in napi_disable Stephen Hemminger
2011-11-18 1:52 ` David Miller
2011-11-18 2:10 ` Stephen Hemminger
2011-11-18 2:15 ` David Miller
2011-11-18 2:44 ` David Miller
2011-11-16 23:42 ` [PATCH 2/6] sky2: pci posting issues Stephen Hemminger
2011-11-16 23:42 ` Stephen Hemminger [this message]
2011-11-16 23:42 ` [PATCH 4/6] sky2: reduce default Tx ring size Stephen Hemminger
2011-11-17 21:07 ` Sven Joachim
2011-11-17 22:41 ` Stephen Hemminger
2011-11-18 0:37 ` [PATCH net-next] sky2: enforce minimum " Stephen Hemminger
2011-11-18 2:44 ` David Miller
2011-11-16 23:42 ` [PATCH 5/6] sky2: used fixed RSS key Stephen Hemminger
2011-11-16 23:43 ` [PATCH 6/6] sky2: version 1.30 Stephen Hemminger
2011-11-17 1:36 ` [PATCH 0/6] sky2 patches for net-next David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111116234344.717497342@vyatta.com \
--to=shemminger@vyatta$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox