diff mbox series

[net-next] netpoll: Eliminate redundant assignment

Message ID 20250319-netpoll_nit-v1-1-a7faac5cbd92@debian.org (mailing list archive)
State New
Delegated to: Netdev Maintainers
Headers show
Series [net-next] netpoll: Eliminate redundant assignment | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
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/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1 this patch: 1
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest fail net-next-2025-03-19--18-00 (tests: 896)

Commit Message

Breno Leitao March 19, 2025, 5:02 p.m. UTC
The assignment of zero to udph->check is unnecessary as it is
immediately overwritten in the subsequent line. Remove the redundant
assignment.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
 net/core/netpoll.c | 1 -
 1 file changed, 1 deletion(-)


---
base-commit: 23c9ff659140f97d44bf6fb59f89526a168f2b86
change-id: 20250319-netpoll_nit-6390753708bc

Best regards,

Comments

Joe Damato March 19, 2025, 8:10 p.m. UTC | #1
On Wed, Mar 19, 2025 at 10:02:44AM -0700, Breno Leitao wrote:
> The assignment of zero to udph->check is unnecessary as it is
> immediately overwritten in the subsequent line. Remove the redundant
> assignment.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>
> ---
>  net/core/netpoll.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> index 3cc3eae9def30..4e1dba572f5ac 100644
> --- a/net/core/netpoll.c
> +++ b/net/core/netpoll.c
> @@ -433,7 +433,6 @@ int netpoll_send_udp(struct netpoll *np, const char *msg, int len)
>  	udph->len = htons(udp_len);
>  
>  	if (np->ipv6) {
> -		udph->check = 0;
>  		udph->check = csum_ipv6_magic(&np->local_ip.in6,
>  					      &np->remote_ip.in6,
>  					      udp_len, IPPROTO_UDP,
> 
> ---
> base-commit: 23c9ff659140f97d44bf6fb59f89526a168f2b86
> change-id: 20250319-netpoll_nit-6390753708bc

Reviewed-by: Joe Damato <jdamato@fastly.com>
diff mbox series

Patch

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 3cc3eae9def30..4e1dba572f5ac 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -433,7 +433,6 @@  int netpoll_send_udp(struct netpoll *np, const char *msg, int len)
 	udph->len = htons(udp_len);
 
 	if (np->ipv6) {
-		udph->check = 0;
 		udph->check = csum_ipv6_magic(&np->local_ip.in6,
 					      &np->remote_ip.in6,
 					      udp_len, IPPROTO_UDP,