From: Xuanqiang Luo Date: Fri, 4 Apr 2025 09:47:51 +0000 (+0800) Subject: netfilter: conntrack: Remove redundant NFCT_ALIGN call X-Git-Tag: v6.16-rc1~132^2~190^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eaa2b34db021c304697b964505cd2477c7c77eb6;p=thirdparty%2Fkernel%2Flinux.git netfilter: conntrack: Remove redundant NFCT_ALIGN call The "nf_ct_tmpl_alloc" function had a redundant call to "NFCT_ALIGN" when aligning the pointer "p". Since "NFCT_ALIGN" always gives the same result for the same input. Signed-off-by: Xuanqiang Luo Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 7f8b245e287ae..de8d50af9b5b5 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c @@ -531,10 +531,8 @@ struct nf_conn *nf_ct_tmpl_alloc(struct net *net, p = tmpl; tmpl = (struct nf_conn *)NFCT_ALIGN((unsigned long)p); - if (tmpl != p) { - tmpl = (struct nf_conn *)NFCT_ALIGN((unsigned long)p); + if (tmpl != p) tmpl->proto.tmpl_padto = (char *)tmpl - (char *)p; - } } else { tmpl = kzalloc(sizeof(*tmpl), flags); if (!tmpl)