* [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c
@ 2025-07-02 13:38 Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 1/6] net: splice: Drop unused @pipe Michal Luczaj
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Michal Luczaj @ 2025-07-02 13:38 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Ayush Sawal, Andrew Lunn, David Ahern,
Neal Cardwell, Kuniyuki Iwashima, Wenjia Zhang, Jan Karcher,
D. Wythe, Tony Lu, Wen Gu
Cc: netdev, linux-kernel, linux-rdma, linux-s390, Michal Luczaj,
Sidraya Jayagond, Dust Li
Couple of cleanup patches to get rid of unused function parameters around
skbuff.c, plus little things spotted along the way.
Offshoot of my question in [1], but way more contained. Found by adding
"-Wunused-parameter -Wno-error" to KBUILD_CFLAGS and grepping for specific
skbuff.c warnings.
[1]: https://lore.kernel.org/netdev/972af569-0c90-4585-9e1f-f2266dab6ec6@rbox.co/
Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
Changes in v3:
- Keep skb_splice_bits() @flags [Jakub, Paolo]
- Link to v2: https://lore.kernel.org/r/20250626-splice-drop-unused-v2-0-3268fac1af89@rbox.co
Changes in v2:
- Fix typos in commit messages
- Remove one more unused parameter in skbuff.c (patch 9)
- Collect R-b, add a one-line cleanup of smc_rx_splice() (patch 7) [Simon]
- Link to v1: https://lore.kernel.org/r/20250624-splice-drop-unused-v1-0-cf641a676d04@rbox.co
---
Michal Luczaj (6):
net: splice: Drop unused @pipe
net: splice: Drop unused @gfp
net: splice: Drop nr_pages_max initialization
net/smc: Drop nr_pages_max initialization
net: skbuff: Drop unused @skb
net: skbuff: Drop unused @skb
.../chelsio/inline_crypto/chtls/chtls_io.c | 3 +-
include/linux/skbuff.h | 2 +-
net/core/skbuff.c | 34 +++++++++-------------
net/ipv4/ip_output.c | 3 +-
net/ipv4/tcp.c | 3 +-
net/ipv6/ip6_output.c | 3 +-
net/kcm/kcmsock.c | 3 +-
net/smc/smc_rx.c | 1 -
net/unix/af_unix.c | 3 +-
9 files changed, 20 insertions(+), 35 deletions(-)
---
base-commit: e96ee511c906c59b7c4e6efd9d9b33917730e000
change-id: 20250618-splice-drop-unused-0e4ea8a12681
Best regards,
--
Michal Luczaj <mhal@rbox.co>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net-next v3 1/6] net: splice: Drop unused @pipe
2025-07-02 13:38 [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c Michal Luczaj
@ 2025-07-02 13:38 ` Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 2/6] net: splice: Drop unused @gfp Michal Luczaj
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Michal Luczaj @ 2025-07-02 13:38 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Ayush Sawal, Andrew Lunn, David Ahern,
Neal Cardwell, Kuniyuki Iwashima, Wenjia Zhang, Jan Karcher,
D. Wythe, Tony Lu, Wen Gu
Cc: netdev, linux-kernel, linux-rdma, linux-s390, Michal Luczaj
Since commit 41c73a0d44c9 ("net: speedup skb_splice_bits()"),
__splice_segment() and spd_fill_page() do not use the @pipe argument. Drop
it.
While adapting the callers, move one line to enforce reverse xmas tree
order.
No functional change intended.
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
net/core/skbuff.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index d6420b74ea9c6a9c53a7c16634cce82a1cd1bbd3..ae0f1aae3c91d914020c64e0703732b9c6cd8511 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3060,10 +3060,8 @@ static bool spd_can_coalesce(const struct splice_pipe_desc *spd,
/*
* Fill page/offset/length into spd, if it can hold more pages.
*/
-static bool spd_fill_page(struct splice_pipe_desc *spd,
- struct pipe_inode_info *pipe, struct page *page,
- unsigned int *len, unsigned int offset,
- bool linear,
+static bool spd_fill_page(struct splice_pipe_desc *spd, struct page *page,
+ unsigned int *len, unsigned int offset, bool linear,
struct sock *sk)
{
if (unlikely(spd->nr_pages == MAX_SKB_FRAGS))
@@ -3091,8 +3089,7 @@ static bool __splice_segment(struct page *page, unsigned int poff,
unsigned int plen, unsigned int *off,
unsigned int *len,
struct splice_pipe_desc *spd, bool linear,
- struct sock *sk,
- struct pipe_inode_info *pipe)
+ struct sock *sk)
{
if (!*len)
return true;
@@ -3111,8 +3108,7 @@ static bool __splice_segment(struct page *page, unsigned int poff,
do {
unsigned int flen = min(*len, plen);
- if (spd_fill_page(spd, pipe, page, &flen, poff,
- linear, sk))
+ if (spd_fill_page(spd, page, &flen, poff, linear, sk))
return true;
poff += flen;
plen -= flen;
@@ -3130,8 +3126,8 @@ static bool __skb_splice_bits(struct sk_buff *skb, struct pipe_inode_info *pipe,
unsigned int *offset, unsigned int *len,
struct splice_pipe_desc *spd, struct sock *sk)
{
- int seg;
struct sk_buff *iter;
+ int seg;
/* map the linear part :
* If skb->head_frag is set, this 'linear' part is backed by a
@@ -3143,7 +3139,7 @@ static bool __skb_splice_bits(struct sk_buff *skb, struct pipe_inode_info *pipe,
skb_headlen(skb),
offset, len, spd,
skb_head_is_locked(skb),
- sk, pipe))
+ sk))
return true;
/*
@@ -3160,7 +3156,7 @@ static bool __skb_splice_bits(struct sk_buff *skb, struct pipe_inode_info *pipe,
if (__splice_segment(skb_frag_page(f),
skb_frag_off(f), skb_frag_size(f),
- offset, len, spd, false, sk, pipe))
+ offset, len, spd, false, sk))
return true;
}
--
2.49.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next v3 2/6] net: splice: Drop unused @gfp
2025-07-02 13:38 [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 1/6] net: splice: Drop unused @pipe Michal Luczaj
@ 2025-07-02 13:38 ` Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 3/6] net: splice: Drop nr_pages_max initialization Michal Luczaj
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Michal Luczaj @ 2025-07-02 13:38 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Ayush Sawal, Andrew Lunn, David Ahern,
Neal Cardwell, Kuniyuki Iwashima, Wenjia Zhang, Jan Karcher,
D. Wythe, Tony Lu, Wen Gu
Cc: netdev, linux-kernel, linux-rdma, linux-s390, Michal Luczaj
Since its introduction in commit 2e910b95329c ("net: Add a function to
splice pages into an skbuff for MSG_SPLICE_PAGES"), skb_splice_from_iter()
never used the @gfp argument. Remove it and adapt callers.
No functional change intended.
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c | 3 +--
include/linux/skbuff.h | 2 +-
net/core/skbuff.c | 3 +--
net/ipv4/ip_output.c | 3 +--
net/ipv4/tcp.c | 3 +--
net/ipv6/ip6_output.c | 3 +--
net/kcm/kcmsock.c | 3 +--
net/unix/af_unix.c | 3 +--
8 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
index d567e42e176011d42b9549d0cc6292a06126d61d..465fa807796439b90c949f54e203a798f06acf1f 100644
--- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
@@ -1096,8 +1096,7 @@ int chtls_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
copy = size;
if (msg->msg_flags & MSG_SPLICE_PAGES) {
- err = skb_splice_from_iter(skb, &msg->msg_iter, copy,
- sk->sk_allocation);
+ err = skb_splice_from_iter(skb, &msg->msg_iter, copy);
if (err < 0) {
if (err == -EMSGSIZE)
goto new_buf;
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 4f6dcb37bae8ada524a1e8f8de44c259cfac695b..b8b06e71b73ea3fb5210239f585f4ba714395fd7 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -5265,7 +5265,7 @@ static inline void skb_mark_for_recycle(struct sk_buff *skb)
}
ssize_t skb_splice_from_iter(struct sk_buff *skb, struct iov_iter *iter,
- ssize_t maxsize, gfp_t gfp);
+ ssize_t maxsize);
#endif /* __KERNEL__ */
#endif /* _LINUX_SKBUFF_H */
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index ae0f1aae3c91d914020c64e0703732b9c6cd8511..a34fe37cf7a508c8380e35522d9cde266aa440f9 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -7230,7 +7230,6 @@ static void skb_splice_csum_page(struct sk_buff *skb, struct page *page,
* @skb: The buffer to add pages to
* @iter: Iterator representing the pages to be added
* @maxsize: Maximum amount of pages to be added
- * @gfp: Allocation flags
*
* This is a common helper function for supporting MSG_SPLICE_PAGES. It
* extracts pages from an iterator and adds them to the socket buffer if
@@ -7241,7 +7240,7 @@ static void skb_splice_csum_page(struct sk_buff *skb, struct page *page,
* insufficient space in the buffer to transfer anything.
*/
ssize_t skb_splice_from_iter(struct sk_buff *skb, struct iov_iter *iter,
- ssize_t maxsize, gfp_t gfp)
+ ssize_t maxsize)
{
size_t frag_limit = READ_ONCE(net_hotdata.sysctl_max_skb_frags);
struct page *pages[8], **ppages = pages;
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index a2705d454fd645b442b2901833afa51b26512512..5d75d60efcf361ed9c3b34eaa982f6c667c716f6 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1222,8 +1222,7 @@ static int __ip_append_data(struct sock *sk,
if (WARN_ON_ONCE(copy > msg->msg_iter.count))
goto error;
- err = skb_splice_from_iter(skb, &msg->msg_iter, copy,
- sk->sk_allocation);
+ err = skb_splice_from_iter(skb, &msg->msg_iter, copy);
if (err < 0)
goto error;
copy = err;
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 8a3c99246d2ed32ba45849b56830bf128e265763..039fffd7a594409a3a08546503c8c3d91a79b455 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1297,8 +1297,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)
if (!copy)
goto wait_for_space;
- err = skb_splice_from_iter(skb, &msg->msg_iter, copy,
- sk->sk_allocation);
+ err = skb_splice_from_iter(skb, &msg->msg_iter, copy);
if (err < 0) {
if (err == -EMSGSIZE) {
tcp_mark_push(tp, skb);
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 7bd29a9ff0db8d74c79f50afa5c693231e0f82d5..618ed7d72b28f43ab6d7a02e5f8f53a4d22de87a 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1760,8 +1760,7 @@ static int __ip6_append_data(struct sock *sk,
if (WARN_ON_ONCE(copy > msg->msg_iter.count))
goto error;
- err = skb_splice_from_iter(skb, &msg->msg_iter, copy,
- sk->sk_allocation);
+ err = skb_splice_from_iter(skb, &msg->msg_iter, copy);
if (err < 0)
goto error;
copy = err;
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index 24aec295a51cf737912f1aefe81556bd9f23331e..a0be3896a9340c2a9120bb2692e9deec84d138c6 100644
--- a/net/kcm/kcmsock.c
+++ b/net/kcm/kcmsock.c
@@ -835,8 +835,7 @@ static int kcm_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
if (!sk_wmem_schedule(sk, copy))
goto wait_for_memory;
- err = skb_splice_from_iter(skb, &msg->msg_iter, copy,
- sk->sk_allocation);
+ err = skb_splice_from_iter(skb, &msg->msg_iter, copy);
if (err < 0) {
if (err == -EMSGSIZE)
goto wait_for_memory;
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 564c970d97fffe9fd264e0d02c5670026314ac57..cd0d582bc7d48fbf9cd917c72e1fe4e88232916e 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2388,8 +2388,7 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
if (unlikely(msg->msg_flags & MSG_SPLICE_PAGES)) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
- err = skb_splice_from_iter(skb, &msg->msg_iter, size,
- sk->sk_allocation);
+ err = skb_splice_from_iter(skb, &msg->msg_iter, size);
if (err < 0)
goto out_free;
--
2.49.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next v3 3/6] net: splice: Drop nr_pages_max initialization
2025-07-02 13:38 [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 1/6] net: splice: Drop unused @pipe Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 2/6] net: splice: Drop unused @gfp Michal Luczaj
@ 2025-07-02 13:38 ` Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 4/6] net/smc: " Michal Luczaj
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Michal Luczaj @ 2025-07-02 13:38 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Ayush Sawal, Andrew Lunn, David Ahern,
Neal Cardwell, Kuniyuki Iwashima, Wenjia Zhang, Jan Karcher,
D. Wythe, Tony Lu, Wen Gu
Cc: netdev, linux-kernel, linux-rdma, linux-s390, Michal Luczaj
splice_pipe_desc::nr_pages_max was initialized unnecessarily in commit
41c73a0d44c9 ("net: speedup skb_splice_bits()"). spd_fill_page() compares
spd->nr_pages against a constant MAX_SKB_FRAGS, which makes setting
nr_pages_max redundant.
Remove the assignment. No functional change intended.
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
net/core/skbuff.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index a34fe37cf7a508c8380e35522d9cde266aa440f9..3041f7a3560d58270dffdf923825758f274c8511 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3189,7 +3189,6 @@ int skb_splice_bits(struct sk_buff *skb, struct sock *sk, unsigned int offset,
struct splice_pipe_desc spd = {
.pages = pages,
.partial = partial,
- .nr_pages_max = MAX_SKB_FRAGS,
.ops = &nosteal_pipe_buf_ops,
.spd_release = sock_spd_release,
};
--
2.49.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next v3 4/6] net/smc: Drop nr_pages_max initialization
2025-07-02 13:38 [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c Michal Luczaj
` (2 preceding siblings ...)
2025-07-02 13:38 ` [PATCH net-next v3 3/6] net: splice: Drop nr_pages_max initialization Michal Luczaj
@ 2025-07-02 13:38 ` Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 5/6] net: skbuff: Drop unused @skb Michal Luczaj
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Michal Luczaj @ 2025-07-02 13:38 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Ayush Sawal, Andrew Lunn, David Ahern,
Neal Cardwell, Kuniyuki Iwashima, Wenjia Zhang, Jan Karcher,
D. Wythe, Tony Lu, Wen Gu
Cc: netdev, linux-kernel, linux-rdma, linux-s390, Michal Luczaj,
Sidraya Jayagond, Dust Li
splice_pipe_desc::nr_pages_max was initialized unnecessarily in
commit b8d199451c99 ("net/smc: Allow virtually contiguous sndbufs or RMBs
for SMC-R"). Struct's field is unused in this context.
Remove the assignment. No functional change intended.
Suggested-by: Simon Horman <horms@kernel.org>
Reviewed-by: Sidraya Jayagond <sidraya@linux.ibm.com>
Reviewed-by: Dust Li <dust.li@linux.alibaba.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
net/smc/smc_rx.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c
index e7f1134453ef40dd81a9574d6df4ead95acd8ae5..bbba5d4dc7eb0dbb31a9800023b0caab33e87842 100644
--- a/net/smc/smc_rx.c
+++ b/net/smc/smc_rx.c
@@ -202,7 +202,6 @@ static int smc_rx_splice(struct pipe_inode_info *pipe, char *src, size_t len,
offset = 0;
}
}
- spd.nr_pages_max = nr_pages;
spd.nr_pages = nr_pages;
spd.pages = pages;
spd.partial = partial;
--
2.49.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next v3 5/6] net: skbuff: Drop unused @skb
2025-07-02 13:38 [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c Michal Luczaj
` (3 preceding siblings ...)
2025-07-02 13:38 ` [PATCH net-next v3 4/6] net/smc: " Michal Luczaj
@ 2025-07-02 13:38 ` Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 6/6] " Michal Luczaj
2025-07-08 16:00 ` [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c patchwork-bot+netdevbpf
6 siblings, 0 replies; 8+ messages in thread
From: Michal Luczaj @ 2025-07-02 13:38 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Ayush Sawal, Andrew Lunn, David Ahern,
Neal Cardwell, Kuniyuki Iwashima, Wenjia Zhang, Jan Karcher,
D. Wythe, Tony Lu, Wen Gu
Cc: netdev, linux-kernel, linux-rdma, linux-s390, Michal Luczaj
Since its introduction in commit ce098da1497c ("skbuff: Introduce
slab_build_skb()"), __slab_build_skb() never used the @skb argument. Remove
it and adapt both callers.
No functional change intended.
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
net/core/skbuff.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 3041f7a3560d58270dffdf923825758f274c8511..4893350bc80a105e0a2870f0de03a687c1117217 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -384,8 +384,7 @@ static inline void __finalize_skb_around(struct sk_buff *skb, void *data,
skb_set_kcov_handle(skb, kcov_common_handle());
}
-static inline void *__slab_build_skb(struct sk_buff *skb, void *data,
- unsigned int *size)
+static inline void *__slab_build_skb(void *data, unsigned int *size)
{
void *resized;
@@ -418,7 +417,7 @@ struct sk_buff *slab_build_skb(void *data)
return NULL;
memset(skb, 0, offsetof(struct sk_buff, tail));
- data = __slab_build_skb(skb, data, &size);
+ data = __slab_build_skb(data, &size);
__finalize_skb_around(skb, data, size);
return skb;
@@ -435,7 +434,7 @@ static void __build_skb_around(struct sk_buff *skb, void *data,
* using slab buffer should use slab_build_skb() instead.
*/
if (WARN_ONCE(size == 0, "Use slab_build_skb() instead"))
- data = __slab_build_skb(skb, data, &size);
+ data = __slab_build_skb(data, &size);
__finalize_skb_around(skb, data, size);
}
--
2.49.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next v3 6/6] net: skbuff: Drop unused @skb
2025-07-02 13:38 [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c Michal Luczaj
` (4 preceding siblings ...)
2025-07-02 13:38 ` [PATCH net-next v3 5/6] net: skbuff: Drop unused @skb Michal Luczaj
@ 2025-07-02 13:38 ` Michal Luczaj
2025-07-08 16:00 ` [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c patchwork-bot+netdevbpf
6 siblings, 0 replies; 8+ messages in thread
From: Michal Luczaj @ 2025-07-02 13:38 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Ayush Sawal, Andrew Lunn, David Ahern,
Neal Cardwell, Kuniyuki Iwashima, Wenjia Zhang, Jan Karcher,
D. Wythe, Tony Lu, Wen Gu
Cc: netdev, linux-kernel, linux-rdma, linux-s390, Michal Luczaj
Since its introduction in commit 6fa01ccd8830 ("skbuff: Add pskb_extract()
helper function"), pskb_carve_frag_list() never used the argument @skb.
Drop it and adapt the only caller.
No functional change intended.
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
net/core/skbuff.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 4893350bc80a105e0a2870f0de03a687c1117217..277f7d0666691bd54d6e005c84a2166175455490 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -6757,8 +6757,7 @@ static int pskb_carve(struct sk_buff *skb, const u32 off, gfp_t gfp);
/* carve out the first eat bytes from skb's frag_list. May recurse into
* pskb_carve()
*/
-static int pskb_carve_frag_list(struct sk_buff *skb,
- struct skb_shared_info *shinfo, int eat,
+static int pskb_carve_frag_list(struct skb_shared_info *shinfo, int eat,
gfp_t gfp_mask)
{
struct sk_buff *list = shinfo->frag_list;
@@ -6863,7 +6862,7 @@ static int pskb_carve_inside_nonlinear(struct sk_buff *skb, const u32 off,
skb_clone_fraglist(skb);
/* split line is in frag list */
- if (k == 0 && pskb_carve_frag_list(skb, shinfo, off - pos, gfp_mask)) {
+ if (k == 0 && pskb_carve_frag_list(shinfo, off - pos, gfp_mask)) {
/* skb_frag_unref() is not needed here as shinfo->nr_frags = 0. */
if (skb_has_frag_list(skb))
kfree_skb_list(skb_shinfo(skb)->frag_list);
--
2.49.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c
2025-07-02 13:38 [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c Michal Luczaj
` (5 preceding siblings ...)
2025-07-02 13:38 ` [PATCH net-next v3 6/6] " Michal Luczaj
@ 2025-07-08 16:00 ` patchwork-bot+netdevbpf
6 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-08 16:00 UTC (permalink / raw)
To: Michal Luczaj
Cc: davem, edumazet, kuba, pabeni, horms, ayush.sawal, andrew+netdev,
dsahern, ncardwell, kuniyu, wenjia, jaka, alibuda, tonylu, guwen,
netdev, linux-kernel, linux-rdma, linux-s390, sidraya, dust.li
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 02 Jul 2025 15:38:06 +0200 you wrote:
> Couple of cleanup patches to get rid of unused function parameters around
> skbuff.c, plus little things spotted along the way.
>
> Offshoot of my question in [1], but way more contained. Found by adding
> "-Wunused-parameter -Wno-error" to KBUILD_CFLAGS and grepping for specific
> skbuff.c warnings.
>
> [...]
Here is the summary with links:
- [net-next,v3,1/6] net: splice: Drop unused @pipe
https://git.kernel.org/netdev/net-next/c/1024f1207161
- [net-next,v3,2/6] net: splice: Drop unused @gfp
https://git.kernel.org/netdev/net-next/c/25489a4f5564
- [net-next,v3,3/6] net: splice: Drop nr_pages_max initialization
(no matching commit)
- [net-next,v3,4/6] net/smc: Drop nr_pages_max initialization
(no matching commit)
- [net-next,v3,5/6] net: skbuff: Drop unused @skb
https://git.kernel.org/netdev/net-next/c/ad0ac6cd9c04
- [net-next,v3,6/6] net: skbuff: Drop unused @skb
https://git.kernel.org/netdev/net-next/c/ab34e14258cd
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] 8+ messages in thread
end of thread, other threads:[~2025-07-08 15:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 13:38 [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 1/6] net: splice: Drop unused @pipe Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 2/6] net: splice: Drop unused @gfp Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 3/6] net: splice: Drop nr_pages_max initialization Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 4/6] net/smc: " Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 5/6] net: skbuff: Drop unused @skb Michal Luczaj
2025-07-02 13:38 ` [PATCH net-next v3 6/6] " Michal Luczaj
2025-07-08 16:00 ` [PATCH net-next v3 0/6] net: Remove unused function parameters in skbuff.c 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).