On Thu, 2014-07-03 at 15:47 +0200, Bart Van Assche wrote:

> -             if (rsp->flags & (SRP_RSP_FLAG_DOOVER | SRP_RSP_FLAG_DOUNDER))
> -                     scsi_set_resid(scmnd, 
> be32_to_cpu(rsp->data_out_res_cnt));
> -             else if (rsp->flags & (SRP_RSP_FLAG_DIOVER | 
> SRP_RSP_FLAG_DIUNDER))
> +             if (rsp->flags & SRP_RSP_FLAG_DIUNDER)
>                       scsi_set_resid(scmnd, 
> be32_to_cpu(rsp->data_in_res_cnt));
> +             else if (rsp->flags & SRP_RSP_FLAG_DIOVER)
> +                     scsi_set_resid(scmnd, 
> -be32_to_cpu(rsp->data_in_res_cnt));
> +             else if (rsp->flags & SRP_RSP_FLAG_DOUNDER)
> +                     scsi_set_resid(scmnd, 
> be32_to_cpu(rsp->data_out_res_cnt));
> +             else if (rsp->flags & SRP_RSP_FLAG_DOOVER)
> +                     scsi_set_resid(scmnd, 
> -be32_to_cpu(rsp->data_out_res_cnt));

LGTM. I wonder if we're getting to a point we should hide all the flag
checking behind a if (unlikely(rsp->flags)) { ...

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to