Skip to content

Commit 2b49117

Browse files
YueHaibingdavem330
authored andcommitted
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: YueHaibing <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b78ac6e commit 2b49117

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/net/ethernet/micrel/ks8695net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ ks8695_timeout(struct net_device *ndev)
11641164
* sk_buff and adds it to the TX ring. It then kicks the TX DMA
11651165
* engine to ensure transmission begins.
11661166
*/
1167-
static int
1167+
static netdev_tx_t
11681168
ks8695_start_xmit(struct sk_buff *skb, struct net_device *ndev)
11691169
{
11701170
struct ks8695_priv *ksp = netdev_priv(ndev);

drivers/net/ethernet/micrel/ks8851_mll.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,9 +1021,9 @@ static void ks_write_qmu(struct ks_net *ks, u8 *pdata, u16 len)
10211021
* spin_lock_irqsave is required because tx and rx should be mutual exclusive.
10221022
* So while tx is in-progress, prevent IRQ interrupt from happenning.
10231023
*/
1024-
static int ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
1024+
static netdev_tx_t ks_start_xmit(struct sk_buff *skb, struct net_device *netdev)
10251025
{
1026-
int retv = NETDEV_TX_OK;
1026+
netdev_tx_t retv = NETDEV_TX_OK;
10271027
struct ks_net *ks = netdev_priv(netdev);
10281028

10291029
disable_irq(netdev->irq);

0 commit comments

Comments
 (0)