Re: [PATCH v2] IB/core: remove dead code

2016-06-07 Thread Sagi Grimberg
Actually it looks like the data-integrity insert/strip operation (where protection sg list does not exist) is broken. It looks that the protection scatterlist should be done only if prot_sg_count was provided... I don't have access to mlx5 devices at the moment (still waiting to get some...)

Re: [PATCH v2] IB/core: remove dead code

2016-06-07 Thread Christoph Hellwig
On Tue, Jun 07, 2016 at 03:41:04PM +0300, Sagi Grimberg wrote: > Actually it looks like the data-integrity insert/strip operation > (where protection sg list does not exist) is broken. > > It looks that the protection scatterlist should be done only if > prot_sg_count was provided... > > I don't

Re: [PATCH v2] IB/core: remove dead code

2016-06-07 Thread Sagi Grimberg
On 07/06/16 00:15, Sudip Mukherjee wrote: prot_sg_cnt has been assigned with the value of ret which we have already checked to be non-zero so prot_sg_cnt can never be zero at this point of the code and hence the else part can never execute. And since we know prot_sg_cnt is non zero there is no

Re: [PATCH v2] IB/core: remove dead code

2016-06-07 Thread Leon Romanovsky
On Mon, Jun 06, 2016 at 10:15:06PM +0100, Sudip Mukherjee wrote: > prot_sg_cnt has been assigned with the value of ret which we have > already checked to be non-zero so prot_sg_cnt can never be zero at this > point of the code and hence the else part can never execute. > And since we know prot_sg_c

[PATCH v2] IB/core: remove dead code

2016-06-06 Thread Sudip Mukherjee
prot_sg_cnt has been assigned with the value of ret which we have already checked to be non-zero so prot_sg_cnt can never be zero at this point of the code and hence the else part can never execute. And since we know prot_sg_cnt is non zero there is no use for the if condition also. Signed-off-by: