From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Van Assche Subject: Re: [PATCH 3/5] mlx5: Avoid that sparse complains about dubious !x & y expressions Date: Thu, 8 Dec 2016 09:52:20 -0800 Message-ID: References: <9ff07804-492c-c67a-e729-b31e0f863027@sandisk.com> <572c702f-589f-2d5a-9e13-45223191db85@sandisk.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Or Gerlitz , Saeed Mahameed Cc: Eli Cohen , "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Matan Barak List-Id: linux-rdma@vger.kernel.org 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. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html