diff mbox series

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

Message ID 20211208024732.142541-5-sakiwit@gmail.com (mailing list archive)
State Accepted
Commit 9745177c948984d61f7853f922d501cc440aae47
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: x25: drop harmless check of !more | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Jεan Sacren Dec. 8, 2021, 7:20 a.m. UTC
From: Jean Sacren <sakiwit@gmail.com>

'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 <sakiwit@gmail.com>
---
 net/x25/x25_in.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin Schiller Dec. 8, 2021, 7:51 a.m. UTC | #1
On 2021-12-08 08:20, Jεan Sacren wrote:
> From: Jean Sacren <sakiwit@gmail.com>
> 
> '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 <sakiwit@gmail.com>
> ---
>  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>
patchwork-bot+netdevbpf@kernel.org Dec. 10, 2021, 3:20 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed,  8 Dec 2021 00:20:25 -0700 you wrote:
> From: Jean Sacren <sakiwit@gmail.com>
> 
> '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 <sakiwit@gmail.com>
> 
> [...]

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!
diff mbox series

Patch

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){