mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
net: cavium: fix return type of ndo_start_xmit function
[ Upstream commit ac1172dea1 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
279a4f7754
commit
efe22c1208
@@ -2324,7 +2324,7 @@ static inline int send_nic_timestamp_pkt(struct octeon_device *oct,
|
||||
* @returns whether the packet was transmitted to the device okay or not
|
||||
* (NETDEV_TX_OK or NETDEV_TX_BUSY)
|
||||
*/
|
||||
static int liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
static netdev_tx_t liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
{
|
||||
struct lio *lio;
|
||||
struct octnet_buf_free_info *finfo;
|
||||
|
||||
@@ -1390,7 +1390,7 @@ static int send_nic_timestamp_pkt(struct octeon_device *oct,
|
||||
* @returns whether the packet was transmitted to the device okay or not
|
||||
* (NETDEV_TX_OK or NETDEV_TX_BUSY)
|
||||
*/
|
||||
static int liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
static netdev_tx_t liquidio_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
{
|
||||
struct octnet_buf_free_info *finfo;
|
||||
union octnic_cmd_setup cmdsetup;
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
|
||||
static int lio_vf_rep_open(struct net_device *ndev);
|
||||
static int lio_vf_rep_stop(struct net_device *ndev);
|
||||
static int lio_vf_rep_pkt_xmit(struct sk_buff *skb, struct net_device *ndev);
|
||||
static netdev_tx_t lio_vf_rep_pkt_xmit(struct sk_buff *skb,
|
||||
struct net_device *ndev);
|
||||
static void lio_vf_rep_tx_timeout(struct net_device *netdev);
|
||||
static int lio_vf_rep_phys_port_name(struct net_device *dev,
|
||||
char *buf, size_t len);
|
||||
@@ -382,7 +383,7 @@ lio_vf_rep_packet_sent_callback(struct octeon_device *oct,
|
||||
netif_wake_queue(ndev);
|
||||
}
|
||||
|
||||
static int
|
||||
static netdev_tx_t
|
||||
lio_vf_rep_pkt_xmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
{
|
||||
struct lio_vf_rep_desc *vf_rep = netdev_priv(ndev);
|
||||
|
||||
@@ -1268,12 +1268,13 @@ static int octeon_mgmt_stop(struct net_device *netdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int octeon_mgmt_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
static netdev_tx_t
|
||||
octeon_mgmt_xmit(struct sk_buff *skb, struct net_device *netdev)
|
||||
{
|
||||
struct octeon_mgmt *p = netdev_priv(netdev);
|
||||
union mgmt_port_ring_entry re;
|
||||
unsigned long flags;
|
||||
int rv = NETDEV_TX_BUSY;
|
||||
netdev_tx_t rv = NETDEV_TX_BUSY;
|
||||
|
||||
re.d64 = 0;
|
||||
re.s.tstamp = ((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) != 0);
|
||||
|
||||
Reference in New Issue
Block a user