Commit 0cd3edaf authored by YueHaibing's avatar YueHaibing Committed by Greg Kroah-Hartman

net: broadcom: fix return type of ndo_start_xmit function

[ Upstream commit 0c13b8d1 ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 63a0e051
...@@ -568,12 +568,13 @@ static irqreturn_t bcm_enet_isr_dma(int irq, void *dev_id) ...@@ -568,12 +568,13 @@ static irqreturn_t bcm_enet_isr_dma(int irq, void *dev_id)
/* /*
* tx request callback * tx request callback
*/ */
static int bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t
bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct bcm_enet_priv *priv; struct bcm_enet_priv *priv;
struct bcm_enet_desc *desc; struct bcm_enet_desc *desc;
u32 len_stat; u32 len_stat;
int ret; netdev_tx_t ret;
priv = netdev_priv(dev); priv = netdev_priv(dev);
......
...@@ -299,7 +299,7 @@ static enum sbmac_state sbmac_set_channel_state(struct sbmac_softc *, ...@@ -299,7 +299,7 @@ static enum sbmac_state sbmac_set_channel_state(struct sbmac_softc *,
static void sbmac_promiscuous_mode(struct sbmac_softc *sc, int onoff); static void sbmac_promiscuous_mode(struct sbmac_softc *sc, int onoff);
static uint64_t sbmac_addr2reg(unsigned char *ptr); static uint64_t sbmac_addr2reg(unsigned char *ptr);
static irqreturn_t sbmac_intr(int irq, void *dev_instance); static irqreturn_t sbmac_intr(int irq, void *dev_instance);
static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev); static netdev_tx_t sbmac_start_tx(struct sk_buff *skb, struct net_device *dev);
static void sbmac_setmulti(struct sbmac_softc *sc); static void sbmac_setmulti(struct sbmac_softc *sc);
static int sbmac_init(struct platform_device *pldev, long long base); static int sbmac_init(struct platform_device *pldev, long long base);
static int sbmac_set_speed(struct sbmac_softc *s, enum sbmac_speed speed); 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,7 +2028,7 @@ static irqreturn_t sbmac_intr(int irq,void *dev_instance)
* Return value: * Return value:
* nothing * nothing
********************************************************************* */ ********************************************************************* */
static int sbmac_start_tx(struct sk_buff *skb, struct net_device *dev) static netdev_tx_t sbmac_start_tx(struct sk_buff *skb, struct net_device *dev)
{ {
struct sbmac_softc *sc = netdev_priv(dev); struct sbmac_softc *sc = netdev_priv(dev);
unsigned long flags; unsigned long flags;
......
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