diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-04-04 08:33:44 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-05 20:53:44 +0200 |
commit | 0282bc6ae86d84b035afac792b5d5ff67707cdd2 (patch) | |
tree | 6dd4dc4f3be0d0dfc91b3b16c2136ecd5dd4e97b /drivers/net/ethernet/atheros | |
parent | net: x25: Queue received packets in the drivers instead of per-CPU queues (diff) | |
download | linux-0282bc6ae86d84b035afac792b5d5ff67707cdd2.tar.xz linux-0282bc6ae86d84b035afac792b5d5ff67707cdd2.zip |
net: ag71xx: Slightly simplify 'ag71xx_rx_packets()'
There is no need to use 'list_for_each_entry_safe' here, as nothing is
removed from the list in the 'for' loop.
Use 'list_for_each_entry' instead, it is slightly less verbose.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r-- | drivers/net/ethernet/atheros/ag71xx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index a60ce9030581..7352f98123c7 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -1658,9 +1658,9 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit) struct net_device *ndev = ag->ndev; int ring_mask, ring_size, done = 0; unsigned int pktlen_mask, offset; - struct sk_buff *next, *skb; struct ag71xx_ring *ring; struct list_head rx_list; + struct sk_buff *skb; ring = &ag->rx_ring; pktlen_mask = ag->dcfg->desc_pktlen_mask; @@ -1725,7 +1725,7 @@ next: ag71xx_ring_rx_refill(ag); - list_for_each_entry_safe(skb, next, &rx_list, list) + list_for_each_entry(skb, &rx_list, list) skb->protocol = eth_type_trans(skb, ndev); netif_receive_skb_list(&rx_list); |