From: Greg Kroah-Hartman Date: Thu, 26 Feb 2009 01:28:05 +0000 (-0800) Subject: Staging: slicoss: remove jiffies macros X-Git-Tag: firefly_0821_release~14777^2~707 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=db7a673a66cb860f6b9eab4d14331480608ab8f7;p=firefly-linux-kernel-4.4.55.git Staging: slicoss: remove jiffies macros Use the ones built into the kernel, don't reinvent the wheel. Cc: Lior Dotan Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/slicoss/slic_os.h b/drivers/staging/slicoss/slic_os.h index 23e4b1c91b8a..bcc61d5f9387 100644 --- a/drivers/staging/slicoss/slic_os.h +++ b/drivers/staging/slicoss/slic_os.h @@ -42,9 +42,6 @@ #ifndef _SLIC_OS_SPECIFIC_H_ #define _SLIC_OS_SPECIFIC_H_ -#define SLIC_SECS_TO_JIFFS(x) ((x) * HZ) -#define SLIC_MS_TO_JIFFIES(x) (SLIC_SECS_TO_JIFFS((x)) / 1000) - #ifdef DEBUG_REGISTER_TRACE #define WRITE_REG(reg, value, flush) \ { \ diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 3cd78b970586..283156acdd56 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -1713,8 +1713,7 @@ static void slic_timer_ping(ulong dev) __func__, adapter->netdev->name, adapter); } #endif - adapter->pingtimer.expires = - jiffies + SLIC_SECS_TO_JIFFS(PING_TIMER_INTERVAL); + adapter->pingtimer.expires = jiffies + (PING_TIMER_INTERVAL * HZ); add_timer(&adapter->pingtimer); } @@ -1834,7 +1833,7 @@ static int slic_if_init(struct adapter *adapter) if (!card->loadtimerset) { init_timer(&card->loadtimer); card->loadtimer.expires = - jiffies + SLIC_SECS_TO_JIFFS(SLIC_LOADTIMER_PERIOD); + jiffies + (SLIC_LOADTIMER_PERIOD * HZ); card->loadtimer.data = (ulong) card; card->loadtimer.function = &slic_timer_load_check; add_timer(&card->loadtimer); @@ -1847,7 +1846,7 @@ static int slic_if_init(struct adapter *adapter) __func__); init_timer(&adapter->statstimer); adapter->statstimer.expires = - jiffies + SLIC_SECS_TO_JIFFS(STATS_TIMER_INTERVAL); + jiffies + (STATS_TIMER_INTERVAL * HZ); adapter->statstimer.data = (ulong) adapter->netdev; adapter->statstimer.function = &slic_timer_get_stats; add_timer(&adapter->statstimer); @@ -1861,7 +1860,7 @@ static int slic_if_init(struct adapter *adapter) __func__); init_timer(&adapter->pingtimer); adapter->pingtimer.expires = - jiffies + SLIC_SECS_TO_JIFFS(PING_TIMER_INTERVAL); + jiffies + (PING_TIMER_INTERVAL * HZ); adapter->pingtimer.data = (ulong) dev; adapter->pingtimer.function = &slic_timer_ping; add_timer(&adapter->pingtimer); @@ -3134,8 +3133,7 @@ static void slic_timer_get_stats(ulong dev) /* DBG_MSG ("slicoss: %s adapter[%p] linkstate[%x] NOT UP!\n", __func__, adapter, adapter->linkstate); */ } - adapter->statstimer.expires = jiffies + - SLIC_SECS_TO_JIFFS(STATS_TIMER_INTERVAL); + adapter->statstimer.expires = jiffies + (STATS_TIMER_INTERVAL * HZ); add_timer(&adapter->statstimer); } #endif @@ -3191,8 +3189,7 @@ static void slic_timer_load_check(ulong cardaddr) } } card->events = 0; - card->loadtimer.expires = - jiffies + SLIC_SECS_TO_JIFFS(SLIC_LOADTIMER_PERIOD); + card->loadtimer.expires = jiffies + (SLIC_LOADTIMER_PERIOD * HZ); add_timer(&card->loadtimer); } @@ -4920,7 +4917,7 @@ static int slic_dump_thread(void *context) struct adapter *adapter; struct adapter *dump_adapter = NULL; u32 dump_complete = 0; - u32 delay = SLIC_SECS_TO_JIFFS(PING_TIMER_INTERVAL); + u32 delay = (PING_TIMER_INTERVAL * HZ); struct slic_regs *pregs; u32 i; struct slic_upr *upr, *uprnext; @@ -5763,9 +5760,9 @@ static u32 slic_dump_send_cmd(struct sliccard *card, u32 cmd_physh, u32 buf_physl, u32 buf_physh) { - ulong timeout = SLIC_MS_TO_JIFFIES(500); /* 500 msec */ + ulong timeout = msecs_to_jiffies(500); /* 500 msec */ u32 attempts = 5; - u32 delay = SLIC_MS_TO_JIFFIES(10); /* 10 msec */ + u32 delay = msecs_to_jiffies(10); /* 10 msec */ struct adapter *adapter = card->master; ASSERT(adapter);