On Thu, Dec 23, 2010 at 10:31 PM, David Dillow <dillo...@ornl.gov> wrote: > This is a break-out and slight cleanup of Bart Van Assche's work. > --- > drivers/infiniband/ulp/srp/ib_srp.c | 45 ++++++++++++++++++---------------- > 1 files changed, 24 insertions(+), 21 deletions(-) > > diff --git a/drivers/infiniband/ulp/srp/ib_srp.c > b/drivers/infiniband/ulp/srp/ib_srp.c > index 95fb9f0..a14975b 100644 > --- a/drivers/infiniband/ulp/srp/ib_srp.c > +++ b/drivers/infiniband/ulp/srp/ib_srp.c > @@ -441,18 +441,28 @@ static void srp_disconnect_target(struct > srp_target_port *target) > wait_for_completion(&target->done); > } > > +static bool srp_change_state(struct srp_target_port *target, > + enum srp_target_state old, > + enum srp_target_state new) > +{ > + int changed = false; > + > + spin_lock_irq(target->scsi_host->host_lock); > + if (target->state == old) { > + target->state = new; > + changed = true; > + } > + spin_unlock_irq(target->scsi_host->host_lock); > + return changed; > +}
The variable 'changed' either has the value 'true' or 'false' and is converted by the return statement into the type bool, so I'm surprised to see that this variable has been declared as an int ? Even if this is not addressed, you can add: Signed-off-by: Bart Van Assche <bvanass...@acm.org> Bart. -- 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