[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-rdma
Subject: Re: [RFC 2/8] IB/srp: consolidate state change code
From: David Dillow <dillowda () ornl ! gov>
Date: 2010-12-27 17:33:02
Message-ID: 1293471182.2896.19.camel () obelisk ! thedillows ! org
[Download RAW message or body]
On Mon, 2010-12-27 at 16:12 +0100, Bart Van Assche wrote:
> On Thu, Dec 23, 2010 at 10:31 PM, David Dillow <dillowda@ornl.gov> wrote:
> > This is a break-out and slight cleanup of Bart Van Assche's work.
> > +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 ?
Yeah, I missed it when I changed the return type based on your earlier
feedback.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic