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

net: micrel: 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 b78ac6ec
...@@ -1164,7 +1164,7 @@ ks8695_timeout(struct net_device *ndev) ...@@ -1164,7 +1164,7 @@ ks8695_timeout(struct net_device *ndev)
* sk_buff and adds it to the TX ring. It then kicks the TX DMA * sk_buff and adds it to the TX ring. It then kicks the TX DMA
* engine to ensure transmission begins. * engine to ensure transmission begins.
*/ */
static int static netdev_tx_t
ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev) ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev)
{ {
struct ks8695_priv *ksp = netdev_priv(ndev); struct ks8695_priv *ksp = netdev_priv(ndev);
......
...@@ -1021,9 +1021,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len) ...@@ -1021,9 +1021,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)
* spin_lock_irqsave is required because tx and rx should be mutual exclusive. * spin_lock_irqsave is required because tx and rx should be mutual exclusive.
* So while tx is in-progress, prevent IRQ interrupt from happenning. * So while tx is in-progress, prevent IRQ interrupt from happenning.
*/ */
static int ks_start_xmit(struct sk_buff *skb, struct net_device *netdev) static netdev_tx_t ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
{ {
int retv = NETDEV_TX_OK; netdev_tx_t retv = NETDEV_TX_OK;
struct ks_net *ks = netdev_priv(netdev); struct ks_net *ks = netdev_priv(netdev);
disable_irq(netdev->irq); disable_irq(netdev->irq);
......
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