On 02/18/13 05:06, David Dillow wrote:
On Fri, 2013-02-15 at 10:39 +0100, Bart Van Assche wrote:
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 8a7eb9f..b34752d 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -734,6 +734,7 @@ static int srp_reconnect_target(struct srp_target_port *target)
scsi_target_unblock(&shost->shost_gendev, ret == 0 ? SDEV_RUNNING :
SDEV_TRANSPORT_OFFLINE);
+ target->transport_offline = ret != 0;
Minor nit, that line is hard to read; I keep thinking it needs parens
around the conditional...
Perhaps
target->transport_offline = !!ret;
or
target->transport_offline = ret;
gcc should do the right conversion since we're assigning to a bool.
Personally I prefer changing the assignment into the first alternative
since it's more explicit than the second alternative - it doesn't
require the person who's reading the source code that the
transport_offline variable has been declared as "bool".
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html