netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] brcmfmac: use msecs_to_jiffies for time conversion
@ 2015-02-06 10:26 Nicholas Mc Guire
  2015-02-11 18:18 ` Arend van Spriel
  2015-02-26 13:01 ` Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Nicholas Mc Guire @ 2015-02-06 10:26 UTC (permalink / raw)
  To: Brett Rudley
  Cc: Arend van Spriel, Franky (Zhenhui) Lin, Hante Meuleman,
	Kalle Valo, Pieter-Paul Giesberts, John W. Linville, Daniel Kim,
	linux-wireless, brcm80211-dev-list, netdev, linux-kernel,
	Nicholas Mc Guire

This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

Patch was only compile tested with x86_64_defconfig + CONFIG_BRCMFMAC=m,
CONFIG_MMC=m, CONFIG_BRCMFMAC_SDIO=y

Patch is against 3.19.0-rc7 (localversion-next is -next-20150204)

 drivers/net/wireless/brcm80211/brcmfmac/sdio.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
index 5e9d208..4f9469b 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
@@ -3972,7 +3972,7 @@ brcmf_sdio_watchdog(unsigned long data)
 		/* Reschedule the watchdog */
 		if (bus->wd_timer_valid)
 			mod_timer(&bus->timer,
-				  jiffies + BRCMF_WD_POLL_MS * HZ / 1000);
+				  jiffies + msecs_to_jiffies(BRCMF_WD_POLL_MS));
 	}
 }
 
@@ -4291,13 +4291,13 @@ void brcmf_sdio_wd_timer(struct brcmf_sdio *bus, uint wdtick)
 			   dynamically changed or in the first instance
 			 */
 			bus->timer.expires =
-				jiffies + BRCMF_WD_POLL_MS * HZ / 1000;
+				jiffies + msecs_to_jiffies(BRCMF_WD_POLL_MS);
 			add_timer(&bus->timer);
 
 		} else {
 			/* Re arm the timer, at last watchdog period */
 			mod_timer(&bus->timer,
-				jiffies + BRCMF_WD_POLL_MS * HZ / 1000);
+				jiffies + msecs_to_jiffies(BRCMF_WD_POLL_MS));
 		}
 
 		bus->wd_timer_valid = true;
-- 
1.7.10.4

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

* Re: [PATCH] brcmfmac: use msecs_to_jiffies for time conversion
  2015-02-06 10:26 [PATCH] brcmfmac: use msecs_to_jiffies for time conversion Nicholas Mc Guire
@ 2015-02-11 18:18 ` Arend van Spriel
  2015-02-26 13:01 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Arend van Spriel @ 2015-02-11 18:18 UTC (permalink / raw)
  To: Nicholas Mc Guire
  Cc: Brett Rudley, Franky (Zhenhui) Lin, Hante Meuleman, Kalle Valo,
	Pieter-Paul Giesberts, John W. Linville, Daniel Kim,
	linux-wireless, brcm80211-dev-list, netdev, linux-kernel

On 02/06/15 11:26, Nicholas Mc Guire wrote:
> This is only an API consolidation and should make things more readable
> it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Acked-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: Nicholas Mc Guire<hofrat@osadl.org>
> ---
>
> Patch was only compile tested with x86_64_defconfig + CONFIG_BRCMFMAC=m,
> CONFIG_MMC=m, CONFIG_BRCMFMAC_SDIO=y
>
> Patch is against 3.19.0-rc7 (localversion-next is -next-20150204)
>
>   drivers/net/wireless/brcm80211/brcmfmac/sdio.c |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> index 5e9d208..4f9469b 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
> @@ -3972,7 +3972,7 @@ brcmf_sdio_watchdog(unsigned long data)
>   		/* Reschedule the watchdog */
>   		if (bus->wd_timer_valid)
>   			mod_timer(&bus->timer,
> -				  jiffies + BRCMF_WD_POLL_MS * HZ / 1000);
> +				  jiffies + msecs_to_jiffies(BRCMF_WD_POLL_MS));
>   	}
>   }
>
> @@ -4291,13 +4291,13 @@ void brcmf_sdio_wd_timer(struct brcmf_sdio *bus, uint wdtick)
>   			   dynamically changed or in the first instance
>   			 */
>   			bus->timer.expires =
> -				jiffies + BRCMF_WD_POLL_MS * HZ / 1000;
> +				jiffies + msecs_to_jiffies(BRCMF_WD_POLL_MS);
>   			add_timer(&bus->timer);
>
>   		} else {
>   			/* Re arm the timer, at last watchdog period */
>   			mod_timer(&bus->timer,
> -				jiffies + BRCMF_WD_POLL_MS * HZ / 1000);
> +				jiffies + msecs_to_jiffies(BRCMF_WD_POLL_MS));
>   		}
>
>   		bus->wd_timer_valid = true;

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

* Re: brcmfmac: use msecs_to_jiffies for time conversion
  2015-02-06 10:26 [PATCH] brcmfmac: use msecs_to_jiffies for time conversion Nicholas Mc Guire
  2015-02-11 18:18 ` Arend van Spriel
@ 2015-02-26 13:01 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2015-02-26 13:01 UTC (permalink / raw)
  To: Nicholas Mc Guire
  Cc: Brett Rudley, Arend van Spriel, Franky (Zhenhui) Lin,
	Hante Meuleman, Pieter-Paul Giesberts, John W. Linville,
	Daniel Kim, linux-wireless, brcm80211-dev-list, netdev,
	linux-kernel, Nicholas Mc Guire


> This is only an API consolidation and should make things more readable
> it replaces var * HZ / 1000 by msecs_to_jiffies(var).
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> Acked-by: Arend van Spriel <arend@broadcom.com>

Thanks, applied to wireless-drivers-next.git.

Kalle Valo

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

end of thread, other threads:[~2015-02-26 13:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-06 10:26 [PATCH] brcmfmac: use msecs_to_jiffies for time conversion Nicholas Mc Guire
2015-02-11 18:18 ` Arend van Spriel
2015-02-26 13:01 ` Kalle Valo

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).