diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-03-13 15:39:23 -0700 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2024-05-14 12:21:02 +0200 |
commit | 5ac8cf1eab606129fdf9588501ac134a2b548ea5 (patch) | |
tree | 23bfff67034735650c678167f0a449b16acc24ab | |
parent | eb1b0220439262d6fff2a2e2180b87db27390905 (diff) | |
download | openwrt-5ac8cf1eab606129fdf9588501ac134a2b548ea5.tar.gz openwrt-5ac8cf1eab606129fdf9588501ac134a2b548ea5.tar.bz2 openwrt-5ac8cf1eab606129fdf9588501ac134a2b548ea5.zip |
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>
-rw-r--r-- | target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index 8132849a9a..8f2a9c7723 100644 --- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -1319,7 +1319,6 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit) int ring_mask = BIT(ring->order) - 1; int ring_size = BIT(ring->order); struct list_head rx_list; - struct sk_buff *next; struct sk_buff *skb; int done = 0; @@ -1379,7 +1378,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, dev); netif_receive_skb_list(&rx_list); |