netfilter: conntrack: add __force annotation to silence harmless warning
Subsystems (2)
Florian Westphal
maintainerPATCH 1/1 netfilter: conntrack: add __force annotation to silence harmless warning
nf_conntrack_core.c:222:14: sparse: cast from restricted __be16 nf_conntrack_core.c:222:55: sparse: restricted __be16 degrades to integer
no need to convert anything, just add __force to silence the warning.
Fixes 21a92d58de4e ("netfilter: conntrack: use siphash_4u64")
Reported-by kernel test robot <[email protected]>
Signed-off-by Florian Westphal <[email protected]>
--- net/netfilter/nf_conntrack_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/netfilter/nf_conntrack_core.c +3 -1
@@ -219,7 +219,9 @@ static u32 hash_conntrack_raw(const struct nf_conntrack_tuple *tuple, a = (u64 )tuple->src.u3.all[0 ] <<32 | tuple->src.u3.all[3 ]; b = (u64 )tuple->dst.u3.all[0 ] <<32 | tuple->dst.u3.all[3 ]; - c = (u64 )tuple->src.u.all <<32 | tuple->dst.u.all <<16 | tuple->dst.protonum; + c = (__force u64 )tuple->src.u.all <<32 | (__force u64 )tuple->dst.u.all <<16 ; + c |= tuple->dst.protonum; + d = (u64 )zoneid <<32 |net_hash_mix (net);/* IPv4: u3.all[1,2,3] == 0 */
Signature · 1 line
2.37.4
Pablo Neira Ayuso
maintainerQuoted 4 lines · Florian Westphal
nf_conntrack_core.c:222:14: sparse: cast from restricted
__be16nf_conntrack_core.c:222:55: sparse: restricted__be16degrades to integerno need to convert anything, just add
__forceto silence the warning.
Squashed into original patch, thanks