Re: [PATCH net-next] net: Drop unused @sk of __skb_try_recv_from_queue()

From: Michal Luczaj
Date: Sun Jun 15 2025 - 17:20:26 EST


On 4/7/25 21:01, Michal Luczaj wrote:
> __skb_try_recv_from_queue() deals with a queue, @sk is never used.
> Remove sk from function parameters, adapt callers.
>
> No functional change intended.

Looking at datagram.c, it's a similar story with skb_free_datagram(): its
@sk is unused since commit 4890b686f408 ("net: keep sk->sk_forward_alloc as
small as possible").

All this function does is `consume_skb(skb)`. Would it be worth dropping
the `sk` parameter? Or making callers directly invoke consume_skb()?

$ git grep skb_free_datagram | wc -l
52

Thanks,
Michal