Skip to content

Commit 420aabe

Browse files
mmhalkuba-moo
authored andcommitted
net: Drop unused @sk of __skb_try_recv_from_queue()
__skb_try_recv_from_queue() deals with a queue, @sk is not used since commit e427cad ("net: datagram: drop 'destructor' argument from several helpers"). Remove sk from function parameters, adapt callers. No functional change intended. Signed-off-by: Michal Luczaj <mhal@rbox.co> Reviewed-by: Joe Damato <jdamato@fastly.com> Link: https://patch.msgid.link/20250407-cleanup-drop-param-sk-v1-1-cd076979afac@rbox.co Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 6a0f72c commit 420aabe

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

include/linux/skbuff.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4105,8 +4105,7 @@ static inline void skb_frag_list_init(struct sk_buff *skb)
41054105
int __skb_wait_for_more_packets(struct sock *sk, struct sk_buff_head *queue,
41064106
int *err, long *timeo_p,
41074107
const struct sk_buff *skb);
4108-
struct sk_buff *__skb_try_recv_from_queue(struct sock *sk,
4109-
struct sk_buff_head *queue,
4108+
struct sk_buff *__skb_try_recv_from_queue(struct sk_buff_head *queue,
41104109
unsigned int flags,
41114110
int *off, int *err,
41124111
struct sk_buff **last);

net/core/datagram.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,7 @@ static struct sk_buff *skb_set_peeked(struct sk_buff *skb)
163163
return skb;
164164
}
165165

166-
struct sk_buff *__skb_try_recv_from_queue(struct sock *sk,
167-
struct sk_buff_head *queue,
166+
struct sk_buff *__skb_try_recv_from_queue(struct sk_buff_head *queue,
168167
unsigned int flags,
169168
int *off, int *err,
170169
struct sk_buff **last)
@@ -261,7 +260,7 @@ struct sk_buff *__skb_try_recv_datagram(struct sock *sk,
261260
* However, this function was correct in any case. 8)
262261
*/
263262
spin_lock_irqsave(&queue->lock, cpu_flags);
264-
skb = __skb_try_recv_from_queue(sk, queue, flags, off, &error,
263+
skb = __skb_try_recv_from_queue(queue, flags, off, &error,
265264
last);
266265
spin_unlock_irqrestore(&queue->lock, cpu_flags);
267266
if (error)

net/ipv4/udp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,8 +1942,8 @@ struct sk_buff *__skb_recv_udp(struct sock *sk, unsigned int flags,
19421942
error = -EAGAIN;
19431943
do {
19441944
spin_lock_bh(&queue->lock);
1945-
skb = __skb_try_recv_from_queue(sk, queue, flags, off,
1946-
err, &last);
1945+
skb = __skb_try_recv_from_queue(queue, flags, off, err,
1946+
&last);
19471947
if (skb) {
19481948
if (!(flags & MSG_PEEK))
19491949
udp_skb_destructor(sk, skb);
@@ -1964,8 +1964,8 @@ struct sk_buff *__skb_recv_udp(struct sock *sk, unsigned int flags,
19641964
spin_lock(&sk_queue->lock);
19651965
skb_queue_splice_tail_init(sk_queue, queue);
19661966

1967-
skb = __skb_try_recv_from_queue(sk, queue, flags, off,
1968-
err, &last);
1967+
skb = __skb_try_recv_from_queue(queue, flags, off, err,
1968+
&last);
19691969
if (skb && !(flags & MSG_PEEK))
19701970
udp_skb_dtor_locked(sk, skb);
19711971
spin_unlock(&sk_queue->lock);

0 commit comments

Comments
 (0)