Thread (1 message) 1 message, 1 author, 2012-03-03

Re: [PATCH 07/18] ib_srp: Introduce three helper functions

From: Bart Van Assche <hidden>
Date: 2012-03-03 14:41:45

On 02/26/12 06:32, David Dillow wrote:
On Sat, 2012-01-14 at 12:45 +0000, Bart Van Assche wrote:
quoted
Introduce srp_remove_target(), srp_change_state_to_removed() and
srp_scan_target().
+static bool srp_change_state_to_removed(struct srp_target_port *target)
+{
+	bool changed = false;
+
+	spin_lock_irq(&target->lock);
+	if (target->state != SRP_TARGET_REMOVED) {
+		target->state = SRP_TARGET_REMOVED;
+		changed = true;
+	}
+	spin_unlock_irq(&target->lock);
+
+	return changed;
+}
I'm not sure why you introduce this here, just to move
srp_change_state() up and change this back to
	srp_change_state(target, SRP_TARGET_LIVE, SRP_TARGET_REMOVED);
in the next patch.

There also doesn't seem to be much of a reason to introduce
srp_scan_target() now rather than in patch 18 where you add another use
of it.
I'll move these changes to a later point in the patch series.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help