Message ID | 1610597696-128610-1-git-send-email-yejune.deng@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f4d133d86af7f39a0f5bdaf7a888ec7b84733b5e |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | tcp_cubic: use memset and offsetof init | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | success | CCed 6 of 6 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 17 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Thu, 14 Jan 2021 12:14:56 +0800 you wrote: > In bictcp_reset(), use memset and offsetof instead of = 0. > > Signed-off-by: Yejune Deng <yejune.deng@gmail.com> > --- > net/ipv4/tcp_cubic.c | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) Here is the summary with links: - tcp_cubic: use memset and offsetof init https://git.kernel.org/netdev/net-next/c/f4d133d86af7 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c index c7bf5b2..ffcbe46 100644 --- a/net/ipv4/tcp_cubic.c +++ b/net/ipv4/tcp_cubic.c @@ -104,16 +104,7 @@ struct bictcp { static inline void bictcp_reset(struct bictcp *ca) { - ca->cnt = 0; - ca->last_max_cwnd = 0; - ca->last_cwnd = 0; - ca->last_time = 0; - ca->bic_origin_point = 0; - ca->bic_K = 0; - ca->delay_min = 0; - ca->epoch_start = 0; - ca->ack_cnt = 0; - ca->tcp_cwnd = 0; + memset(ca, 0, offsetof(struct bictcp, unused)); ca->found = 0; }
In bictcp_reset(), use memset and offsetof instead of = 0. Signed-off-by: Yejune Deng <yejune.deng@gmail.com> --- net/ipv4/tcp_cubic.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)