Thread (14 messages) 14 messages, 3 authors, 2013-09-28

RE: [PATCH net-next 2/9] bonding: remove __get_first_port()

From: David Laight <hidden>
Date: 2013-09-27 14:52:41

quoted hunk ↗ jump to hunk
@@ -2104,8 +2091,11 @@ void bond_3ad_state_machine_handler(struct work_struct *work)

 	// check if agg_select_timer timer after initialize is timed out
 	if (BOND_AD_INFO(bond).agg_select_timer && !(--BOND_AD_INFO(bond).agg_select_timer)) {
+		slave = bond_first_slave(bond);
+		port = slave ? &(SLAVE_AD_INFO(slave).port) : NULL;
+
 		// select the active aggregator for the bond
-		if ((port = __get_first_port(bond))) {
+		if (port) {
 			if (!port->slave) {
 				pr_warning("%s: Warning: bond's first port is uninitialized\n",
 					   bond->dev->name);
--
Looks like that could be:
		slave = bond_first_slave(bond);
		if (slave) {
			port = SLAVE_AD_INFO(slave).port;
and I assume 'slave == port->slave' so there is no need for the latter check?

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help