Re: [PATCH 3/5] mlx5: Avoid that sparse complains about dubious !x & y expressions

Bart Van Assche
2016-12-08T17:52:20Z

On 12/08/2016 01:26 AM, Or Gerlitz wrote:
> Matan came up with a fix (below) which solves all these sparse
> complaints in both drivers (mlx5 IB and core)
> while basically not touching the code, we will be going with that fix
> to 4.11, thanks, I will add reported
> by pointing to you.

Hello Or,

Please consider to keep the following change:

- MLX5_SET(mkc, mkc, en_rinval, !!((type == IB_MW_TYPE_2)));
+ MLX5_SET(mkc, mkc, en_rinval, type == IB_MW_TYPE_2);

I don't think that specifying two boolean not (!) operators in front of
a boolean expression is useful :-)

Bart.