mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
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> Link: https://github.com/openwrt/openwrt/pull/15435 Link: https://github.com/openwrt/openwrt/pull/15435 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
parent
eb1b022043
commit
5ac8cf1eab
@ -1319,7 +1319,6 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
|
|||||||
int ring_mask = BIT(ring->order) - 1;
|
int ring_mask = BIT(ring->order) - 1;
|
||||||
int ring_size = BIT(ring->order);
|
int ring_size = BIT(ring->order);
|
||||||
struct list_head rx_list;
|
struct list_head rx_list;
|
||||||
struct sk_buff *next;
|
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
int done = 0;
|
int done = 0;
|
||||||
|
|
||||||
@ -1379,7 +1378,7 @@ next:
|
|||||||
|
|
||||||
ag71xx_ring_rx_refill(ag);
|
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, dev);
|
skb->protocol = eth_type_trans(skb, dev);
|
||||||
netif_receive_skb_list(&rx_list);
|
netif_receive_skb_list(&rx_list);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user