lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 11 Feb 2015 19:18:25 +0100
From:	Arend van Spriel <arend@...adcom.com>
To:	Nicholas Mc Guire <hofrat@...dl.org>
CC:	Brett Rudley <brudley@...adcom.com>,
	"Franky (Zhenhui) Lin" <frankyl@...adcom.com>,
	Hante Meuleman <meuleman@...adcom.com>,
	Kalle Valo <kvalo@...eaurora.org>,
	Pieter-Paul Giesberts <pieterpg@...adcom.com>,
	"John W. Linville" <linville@...driver.com>,
	Daniel Kim <dekim@...adcom.com>,
	<linux-wireless@...r.kernel.org>,
	<brcm80211-dev-list@...adcom.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] brcmfmac: use msecs_to_jiffies for time conversion

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@...adcom.com>
> Signed-off-by: Nicholas Mc Guire<hofrat@...dl.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;

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists