Skip to content

Commit 7b620e1

Browse files
GUO Zihuakuba-moo
authored andcommitted
net: sunplus: Fix return type for implementation of ndo_start_xmit
Since Linux now supports CFI, it will be a good idea to fix mismatched return type for implementation of hooks. Otherwise this might get cought out by CFI and cause a panic. spl2sw_ethernet_start_xmit() would return either NETDEV_TX_BUSY or NETDEV_TX_OK, so change the return type to netdev_tx_t directly. Signed-off-by: GUO Zihua <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 0dbaf0f commit 7b620e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/sunplus/spl2sw_driver.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ static int spl2sw_ethernet_stop(struct net_device *ndev)
6262
return 0;
6363
}
6464

65-
static int spl2sw_ethernet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
65+
static netdev_tx_t spl2sw_ethernet_start_xmit(struct sk_buff *skb,
66+
struct net_device *ndev)
6667
{
6768
struct spl2sw_mac *mac = netdev_priv(ndev);
6869
struct spl2sw_common *comm = mac->comm;

0 commit comments

Comments
 (0)