Commit fe72352e authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

net: amd: fix return type of ndo_start_xmit function

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.

Found by coccinelle.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c13b8d1
...@@ -440,7 +440,7 @@ static void am79c961_timeout(struct net_device *dev) ...@@ -440,7 +440,7 @@ static void am79c961_timeout(struct net_device *dev)
/* /*
* Transmit a packet * Transmit a packet
*/ */
static int static netdev_tx_t
am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev) am79c961_sendpacket(struct sk_buff *skb, struct net_device *dev)
{ {
struct dev_priv *priv = netdev_priv(dev); struct dev_priv *priv = netdev_priv(dev);
......
...@@ -339,7 +339,8 @@ static unsigned long lance_probe1( struct net_device *dev, struct lance_addr ...@@ -339,7 +339,8 @@ static unsigned long lance_probe1( struct net_device *dev, struct lance_addr
*init_rec ); *init_rec );
static int lance_open( struct net_device *dev ); static int lance_open( struct net_device *dev );
static void lance_init_ring( struct net_device *dev ); static void lance_init_ring( struct net_device *dev );
static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ); static netdev_tx_t lance_start_xmit(struct sk_buff *skb,
struct net_device *dev);
static irqreturn_t lance_interrupt( int irq, void *dev_id ); static irqreturn_t lance_interrupt( int irq, void *dev_id );
static int lance_rx( struct net_device *dev ); static int lance_rx( struct net_device *dev );
static int lance_close( struct net_device *dev ); static int lance_close( struct net_device *dev );
...@@ -769,7 +770,8 @@ static void lance_tx_timeout (struct net_device *dev) ...@@ -769,7 +770,8 @@ static void lance_tx_timeout (struct net_device *dev)
/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) static netdev_tx_t
lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct lance_private *lp = netdev_priv(dev); struct lance_private *lp = netdev_priv(dev);
struct lance_ioreg *IO = lp->iobase; struct lance_ioreg *IO = lp->iobase;
......
...@@ -894,7 +894,7 @@ static void lance_tx_timeout(struct net_device *dev) ...@@ -894,7 +894,7 @@ static void lance_tx_timeout(struct net_device *dev)
netif_wake_queue(dev); netif_wake_queue(dev);
} }
static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct lance_private *lp = netdev_priv(dev); struct lance_private *lp = netdev_priv(dev);
volatile struct lance_regs *ll = lp->ll; volatile struct lance_regs *ll = lp->ll;
......
...@@ -236,7 +236,8 @@ struct lance_private { ...@@ -236,7 +236,8 @@ struct lance_private {
static int lance_probe( struct net_device *dev); static int lance_probe( struct net_device *dev);
static int lance_open( struct net_device *dev ); static int lance_open( struct net_device *dev );
static void lance_init_ring( struct net_device *dev ); static void lance_init_ring( struct net_device *dev );
static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ); static netdev_tx_t lance_start_xmit(struct sk_buff *skb,
struct net_device *dev);
static irqreturn_t lance_interrupt( int irq, void *dev_id); static irqreturn_t lance_interrupt( int irq, void *dev_id);
static int lance_rx( struct net_device *dev ); static int lance_rx( struct net_device *dev );
static int lance_close( struct net_device *dev ); static int lance_close( struct net_device *dev );
...@@ -511,7 +512,8 @@ static void lance_init_ring( struct net_device *dev ) ...@@ -511,7 +512,8 @@ static void lance_init_ring( struct net_device *dev )
} }
static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev ) static netdev_tx_t
lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct lance_private *lp = netdev_priv(dev); struct lance_private *lp = netdev_priv(dev);
int entry, len; int entry, len;
......
...@@ -1106,7 +1106,7 @@ static void lance_tx_timeout(struct net_device *dev) ...@@ -1106,7 +1106,7 @@ static void lance_tx_timeout(struct net_device *dev)
netif_wake_queue(dev); netif_wake_queue(dev);
} }
static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t lance_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct lance_private *lp = netdev_priv(dev); struct lance_private *lp = netdev_priv(dev);
int entry, skblen, len; int entry, skblen, len;
......
...@@ -2009,7 +2009,7 @@ static int xgbe_close(struct net_device *netdev) ...@@ -2009,7 +2009,7 @@ static int xgbe_close(struct net_device *netdev)
return 0; return 0;
} }
static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev) static netdev_tx_t xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
{ {
struct xgbe_prv_data *pdata = netdev_priv(netdev); struct xgbe_prv_data *pdata = netdev_priv(netdev);
struct xgbe_hw_if *hw_if = &pdata->hw_if; struct xgbe_hw_if *hw_if = &pdata->hw_if;
...@@ -2018,7 +2018,7 @@ static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev) ...@@ -2018,7 +2018,7 @@ static int xgbe_xmit(struct sk_buff *skb, struct net_device *netdev)
struct xgbe_ring *ring; struct xgbe_ring *ring;
struct xgbe_packet_data *packet; struct xgbe_packet_data *packet;
struct netdev_queue *txq; struct netdev_queue *txq;
int ret; netdev_tx_t ret;
DBGPR("-->xgbe_xmit: skb->len = %d\n", skb->len); DBGPR("-->xgbe_xmit: skb->len = %d\n", skb->len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment