diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-09-19 06:45:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-20 00:17:58 -0400 |
commit | 0c13b8d1aee87c35a2fbc1d85a1f766227cf54b5 (patch) | |
tree | fe8506e51d26952d4283eadf4dbccdae6deb0dfb | |
parent | 81255af8d9d5565004792c295dde49344df450ca (diff) |
net: broadcom: 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 <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/broadcom/bcm63xx_enet.c | 5 | ||||
-rw-r--r-- | drivers/net/ethernet/broadcom/sb1250-mac.c | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index 02e7dfc1a2ef..6bae973d4dce 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c | |||
@@ -568,12 +568,13 @@ static irqreturn_t bcm_enet_isr_dma(int irq, void *dev_id) | |||
568 | /* | 568 | /* |
569 | * tx request callback | 569 | * tx request callback |
570 | */ | 570 | */ |
571 | static int bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) | 571 | static netdev_tx_t |
572 | bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) | ||
572 | { | 573 | { |
573 | struct bcm_enet_priv *priv; | 574 | struct bcm_enet_priv *priv; |
574 | struct bcm_enet_desc *desc; | 575 | struct bcm_enet_desc *desc; |
575 | u32 len_stat; | 576 | u32 len_stat; |
576 | int ret; | 577 | netdev_tx_t ret; |
577 | 578 | ||
578 | priv = netdev_priv(dev); | 579 | priv = netdev_priv(dev); |
579 | 580 | ||
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c index c44cff54262c..5db9f4158e62 100644 --- a/drivers/net/ethernet/broadcom/sb1250-mac.c +++ b/drivers/net/ethernet/broadcom/sb1250-mac.c | |||
@@ -299,7 +299,7 @@ static enum sbmac_state sbmac_set_channel_state(struct sbmac_softc *, | |||
299 | static void sbmac_promiscuous_mode(struct sbmac_softc *sc, int onoff); | 299 | static void sbmac_promiscuous_mode(struct sbmac_softc *sc, int onoff); |
300 | static uint64_t sbmac_addr2reg(unsigned char *ptr); | 300 | static uint64_t sbmac_addr2reg(unsigned char *ptr); |
301 | static irqreturn_t sbmac_intr(int irq, void *dev_instance); | 301 | static irqreturn_t sbmac_intr(int irq, void *dev_instance); |
302 | static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev); | 302 | static netdev_tx_t sbmac_start_tx(struct sk_buff *skb, struct net_device *dev); |
303 | static void sbmac_setmulti(struct sbmac_softc *sc); | 303 | static void sbmac_setmulti(struct sbmac_softc *sc); |
304 | static int sbmac_init(struct platform_device *pldev, long long base); | 304 | static int sbmac_init(struct platform_device *pldev, long long base); |
305 | static int sbmac_set_speed(struct sbmac_softc *s, enum sbmac_speed speed); | 305 | static int sbmac_set_speed(struct sbmac_softc *s, enum sbmac_speed speed); |
@@ -2028,7 +2028,7 @@ static irqreturn_t sbmac_intr(int irq,void *dev_instance) | |||
2028 | * Return value: | 2028 | * Return value: |
2029 | * nothing | 2029 | * nothing |
2030 | ********************************************************************* */ | 2030 | ********************************************************************* */ |
2031 | static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev) | 2031 | static netdev_tx_t sbmac_start_tx(struct sk_buff *skb, struct net_device *dev) |
2032 | { | 2032 | { |
2033 | struct sbmac_softc *sc = netdev_priv(dev); | 2033 | struct sbmac_softc *sc = netdev_priv(dev); |
2034 | unsigned long flags; | 2034 | unsigned long flags; |