]> git.baikalelectronics.ru Git - kernel.git/commit
IB/srp: Move code out of a loop
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 22 Apr 2016 21:14:43 +0000 (14:14 -0700)
committerDoug Ledford <dledford@redhat.com>
Thu, 12 May 2016 18:18:57 +0000 (14:18 -0400)
commit93486b60aa21331e438f3f4321bf36ba8ae34b52
treee8071521b38d284e75502d61bb0f03bdcc836c8d
parent2148dbc3e3000ee2df9404701afd0168775b05e6
IB/srp: Move code out of a loop

Since all srp_map_finish_fr() callers pass a non-zero value as
the fourth argument (sg_nents), the sg_nents == 0 check in that
function can be removed. Add a count == 0 check in the caller
of that function.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Laurence Oberman <loberman@redhat.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/srp/ib_srp.c