netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] brcmfmac: cfg80211: use msecs_to_jiffies for time conversion
@ 2015-03-17 12:06 Nicholas Mc Guire
  2015-03-17 12:42 ` Joe Perches
  2015-03-17 16:04 ` Arend van Spriel
  0 siblings, 2 replies; 5+ messages in thread
From: Nicholas Mc Guire @ 2015-03-17 12:06 UTC (permalink / raw)
  To: Brett Rudley
  Cc: Arend van Spriel, Franky (Zhenhui) Lin, Hante Meuleman,
	Kalle Valo, John W. Linville, Pieter-Paul Giesberts, Daniel Kim,
	Johannes Berg, linux-wireless, brcm80211-dev-list, netdev,
	linux-kernel, Nicholas Mc Guire

Converting milliseconds to jiffies by "val * HZ / 1000" is technically
OK but msecs_to_jiffies(val) is the cleaner solution and handles all
corner cases correctly. This is a minor API consolidation only and
should make things more readable.

Patch was compile tested with x86_64_defconfig + CONFIG_BRCMFMAC=m

Patch is agianst 4.0-rc4 (localversion-next is -next-20150317)

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
 drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
index 9b805c9..1996dc2 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/cfg80211.c
@@ -1110,7 +1110,7 @@ brcmf_cfg80211_escan(struct wiphy *wiphy, struct brcmf_cfg80211_vif *vif,
 
 	/* Arm scan timeout timer */
 	mod_timer(&cfg->escan_timeout, jiffies +
-			WL_ESCAN_TIMER_INTERVAL_MS * HZ / 1000);
+		  msecs_to_jiffies(WL_ESCAN_TIMER_INTERVAL_MS));
 
 	return 0;
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-18  7:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-17 12:06 [PATCH] brcmfmac: cfg80211: use msecs_to_jiffies for time conversion Nicholas Mc Guire
2015-03-17 12:42 ` Joe Perches
2015-03-18  6:44   ` Nicholas Mc Guire
     [not found]     ` <20150318064439.GA25924-AxMHDufBahDk7+2FdBfRIA@public.gmane.org>
2015-03-18  7:30       ` Joe Perches
2015-03-17 16:04 ` Arend van Spriel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).