]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
iwlwifi: kill elapsed_jiffies
authorStanislaw Gruszka <sgruszka@redhat.com>
Fri, 12 Nov 2010 07:47:07 +0000 (08:47 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 16 Nov 2010 21:39:09 +0000 (16:39 -0500)
Subtract of jiffies is fine even if one variable overwrap.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-helpers.h
drivers/net/wireless/iwlwifi/iwl-scan.c

index 1aaef70deaecf58d85c7fac8d218578dee97c025..9233683041532b4d757b2470dfa17f2055874fde 100644 (file)
@@ -44,15 +44,6 @@ static inline struct ieee80211_conf *ieee80211_get_hw_conf(
        return &hw->conf;
 }
 
-static inline unsigned long elapsed_jiffies(unsigned long start,
-                                           unsigned long end)
-{
-       if (end >= start)
-               return end - start;
-
-       return end + (MAX_JIFFY_OFFSET - start) + 1;
-}
-
 /**
  * iwl_queue_inc_wrap - increment queue index, wrap back to beginning
  * @index -- current index
index e1aa0e1daa5a71fdda39bf64078f67e8657ad067..12d9363d0afe161774abd5c9b3fd3d95a9e31aa0 100644 (file)
@@ -252,8 +252,7 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv,
 
        IWL_DEBUG_SCAN(priv, "Scan on %sGHz took %dms\n",
                       (priv->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2",
-                      jiffies_to_msecs(elapsed_jiffies
-                                       (priv->scan_start, jiffies)));
+                      jiffies_to_msecs(jiffies - priv->scan_start));
 
        queue_work(priv->workqueue, &priv->scan_completed);