Return-path: Received: from mail-gw3-out.broadcom.com ([216.31.210.64]:10622 "EHLO mail-gw3-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752946AbbBKSSg (ORCPT ); Wed, 11 Feb 2015 13:18:36 -0500 Message-ID: <54DB9CF1.7050606@broadcom.com> (sfid-20150211_191936_016295_B287DEAD) Date: Wed, 11 Feb 2015 19:18:25 +0100 From: Arend van Spriel MIME-Version: 1.0 To: Nicholas Mc Guire CC: Brett Rudley , "Franky (Zhenhui) Lin" , Hante Meuleman , Kalle Valo , Pieter-Paul Giesberts , "John W. Linville" , Daniel Kim , , , , Subject: Re: [PATCH] brcmfmac: use msecs_to_jiffies for time conversion References: <1423218405-17624-1-git-send-email-hofrat@osadl.org> In-Reply-To: <1423218405-17624-1-git-send-email-hofrat@osadl.org> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: 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 > Signed-off-by: Nicholas Mc Guire > --- > > 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;