ath10k: debug: match wait_for_completion_timeout return type
authorNicholas Mc Guire <hofrat@osadl.org>
Mon, 30 Mar 2015 12:39:20 +0000 (15:39 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 1 Apr 2015 17:15:59 +0000 (20:15 +0300)
Return type of wait_for_completion_timeout is unsigned long not int.
An appropriately named unsigned long is added and the assignments fixed up.
Missing spaces 1*HZ -> 1 * HZ were also added along the way.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/debug.c

index 51cf536fd01496e652c6f9713986c4ba8bdb3874..b0f87c3eda6389447fea503152a35df2728cb85e 100644 (file)
@@ -380,12 +380,12 @@ unlock:
 
 static int ath10k_debug_fw_stats_request(struct ath10k *ar)
 {
-       unsigned long timeout;
+       unsigned long timeout, time_left;
        int ret;
 
        lockdep_assert_held(&ar->conf_mutex);
 
-       timeout = jiffies + msecs_to_jiffies(1*HZ);
+       timeout = jiffies + msecs_to_jiffies(1 * HZ);
 
        ath10k_debug_fw_stats_reset(ar);
 
@@ -404,9 +404,10 @@ static int ath10k_debug_fw_stats_request(struct ath10k *ar)
                        return ret;
                }
 
-               ret = wait_for_completion_timeout(&ar->debug.fw_stats_complete,
-                                                 1*HZ);
-               if (ret == 0)
+               time_left =
+               wait_for_completion_timeout(&ar->debug.fw_stats_complete,
+                                           1 * HZ);
+               if (!time_left)
                        return -ETIMEDOUT;
 
                spin_lock_bh(&ar->data_lock);