* [PATCH] net: ag71xx: Slightly simplify 'ag71xx_rx_packets()'
@ 2021-04-04 6:33 Christophe JAILLET
2021-04-05 19:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2021-04-04 6:33 UTC (permalink / raw)
To: chris.snook, davem, kuba
Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET
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>
---
drivers/net/ethernet/atheros/ag71xx.c | 4 ++--
1 file 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 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
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);
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: ag71xx: Slightly simplify 'ag71xx_rx_packets()'
2021-04-04 6:33 [PATCH] net: ag71xx: Slightly simplify 'ag71xx_rx_packets()' Christophe JAILLET
@ 2021-04-05 19:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-05 19:00 UTC (permalink / raw)
To: Christophe JAILLET
Cc: chris.snook, davem, kuba, netdev, linux-kernel, kernel-janitors
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Sun, 4 Apr 2021 08:33:44 +0200 you wrote:
> 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>
> ---
> drivers/net/ethernet/atheros/ag71xx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Here is the summary with links:
- net: ag71xx: Slightly simplify 'ag71xx_rx_packets()'
https://git.kernel.org/netdev/net-next/c/0282bc6ae86d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-05 19:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-04 6:33 [PATCH] net: ag71xx: Slightly simplify 'ag71xx_rx_packets()' Christophe JAILLET
2021-04-05 19:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).