Subject: Re: [PATCH RFC net-next 18/18] net/ipv4: Optimization for fib_info lookup

From: Stephen Hemminger <[email-masked]>
Date: Sat, 1 Sep 2018 13:43:34 -0700

On Fri, 31 Aug 2018 17:49:53 -0700
[email-masked] wrote:

> +static inline unsigned int fib_info_hashfn_cfg(const struct fib_config *cfg)
> +{
> +	unsigned int mask = (fib_info_hash_size - 1);
> +	unsigned int val = 0;
> +
> +	val ^= (cfg->fc_protocol << 8) | cfg->fc_scope;

Why do assignment to 0 than do initial xor?
Why not instead just do assignment in the first statement which would be clearer.