[PATCH net-next] net: x25: drop harmless check of !more

Subsystems: networking [general], the rest, x.25 stack

STALE1772d LANDED

Landed in mainline as 9745177c9489 on 2021-12-10.

3 messages, 3 authors, 2021-12-10 · open the first message on its own page

[PATCH net-next] net: x25: drop harmless check of !more

From: Jεan Sacren <hidden>
Date: 2021-12-08 07:20:55

From: Jean Sacren <redacted>

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

Signed-off-by: Jean Sacren <redacted>
---
 net/x25/x25_in.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c
index e1c4197af468..b981a4828d08 100644
--- a/net/x25/x25_in.c
+++ b/net/x25/x25_in.c
@@ -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){

Re: [PATCH net-next] net: x25: drop harmless check of !more

From: Martin Schiller <ms@dev.tdt.de>
Date: 2021-12-08 08:11:14

On 2021-12-08 08:20, Jεan Sacren wrote:
quoted hunk
From: Jean Sacren <redacted>

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

Signed-off-by: Jean Sacren <redacted>
---
 net/x25/x25_in.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c
index e1c4197af468..b981a4828d08 100644
--- a/net/x25/x25_in.c
+++ b/net/x25/x25_in.c
@@ -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){
Acked-by: Martin Schiller <ms@dev.tdt.de>

Re: [PATCH net-next] net: x25: drop harmless check of !more

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-12-10 03:20:14

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski [off-list ref]:

On Wed,  8 Dec 2021 00:20:25 -0700 you wrote:
From: Jean Sacren <redacted>

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

Signed-off-by: Jean Sacren <redacted>

[...]
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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help