Skip to contentSkip to conversation

net: x25: drop harmless check of !more

PATCH Applied Jεan Sacren 3 participants 3 messages Dec 8, 2021 – Dec 10, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: x25: drop harmless check of !more

From: Jean Sacren <[email protected]>

'more' is checked first. When !more is checked immediately after that, it is always true. We should drop this check.

---
 net/x25/x25_in.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/x25/x25_in.c +1 -1
index e1c4197af468..b981a4828d08 100644
@@ -41,7 +41,7 @@ static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more)
 		return 0;
 	}
 
-	if (!more && x25->fraglen > 0) {	/* End of fragment */
+	if (x25->fraglen > 0) {	/* End of fragment */
 		int len = x25->fraglen + skb->len;
 
 		if ((skbn = alloc_skb(len, GFP_ATOMIC)) == NULL){
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 23 lines · Jεan Sacren

From: Jean Sacren <[email protected]>

'more' is checked first. When !more is checked immediately after that, it is always true. We should drop this check.

---
 net/x25/x25_in.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/x25/x25_in.c +1 -1
index e1c4197af468..b981a4828d08 100644
@@ -41,7 +41,7 @@ static int x25_queue_rx_frame(struct sock *sk,
 struct sk_buff *skb, int more)
 		return 0;
 	}
 
-	if (!more && x25->fraglen > 0) {	/* End of fragment */
+	if (x25->fraglen > 0) {	/* End of fragment */
 		int len = x25->fraglen + skb->len;
 
Quoted 1 line

if ((skbn = alloc_skb(len, GFP_ATOMIC)) == NULL){

#2 lore raw
In reply to Jεan Sacren
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Wed, 8 Dec 2021 00:20:25 -0700 you wrote:

From: Jean Sacren <[email protected]>

'more' is checked first. When !more is checked immediately after that, it is always true. We should drop this check.

[...]

Here is the summary with links:
- [net-next] net: x25: drop harmless check of !more

    https://git.kernel.org/netdev/net-next/c/9745177c9489

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html