Re: [PATCH net-next] tcp: remove useless add operation when init sysctl_max_tw_buckets

From: David Miller
Date: Sun Sep 02 2018 - 19:13:20 EST


From: Yafang Shao <laoar.shao@xxxxxxxxx>
Date: Sat, 1 Sep 2018 20:21:05 +0800

> cp_hashinfo.ehash_mask is always an odd number, which is set in function
> alloc_large_system_hash(). See bellow,
> if (_hash_mask)
> *_hash_mask = (1 << log2qty) - 1; <<< always odd number
>
> Hence the local variable 'cnt' is a even number, as a result of that it is
> no difference to do the incrementation here.
>
> Signed-off-by: Yafang Shao <laoar.shao@xxxxxxxxx>

Applied.