Skip to contentSkip to conversation

consolidate spin_lock/unlock waiting with spin_unlock_wait

PATCH New Nicholas Mc Guire 1 participant 1 message Dec 16, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/6 consolidate spin_lock/unlock waiting with spin_unlock_wait

drivers/net/ethernet/chelsio/cxgb/cxgb2.c consolidate spin_lock/unlock waiting with spin_unlock_wait()

config: x86_64_defconfig with the following addition

        Device Drivers  --->
          [*] Network device support  --->
            [*]   Ethernet driver support  --->
              <M>     Chelsio 10Gb Ethernet support

toolchain: debian wheezy default x86_64-linux-gnu 4.4.5

Builds xcgb2.o without warnings.
no runtime testing (no hardware available)

---
 drivers/net/ethernet/chelsio/cxgb/cxgb2.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/chelsio/cxgb/cxgb2.c +2 -2
index e598713..e4a1bfe 100644
@@ -283,8 +283,8 @@ static int cxgb_close(struct net_device *dev)
 	    !(adapter->open_device_map & PORT_MASK)) {
 		/* Stop statistics accumulation. */
 		smp_mb__after_clear_bit();
-		spin_lock(&adapter->work_lock);   /* sync with update task */
-		spin_unlock(&adapter->work_lock);
+		/* sync with update task */
+		spin_unlock_wait(&adapter->work_lock);
 		cancel_mac_stats_update(adapter);
 	}
 
Signature · 1 line
1.7.2.5