From 032b7969f8874d5ddc65691cd3d008beffd2a09e Mon Sep 17 00:00:00 2001 From: Marek Lindner Date: Tue, 20 Dec 2011 19:30:40 +0800 Subject: batman-adv: convert time_after instances to has_timed_out To increase readability the has_timed_out() functions has been introduced. This patch converts existing time_after() calls to use this wrapper function (if applicable). This patch also converts all timeouts to miliseconds to be consistent. Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich --- net/batman-adv/routing.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/batman-adv/routing.c') diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index b72d7f3b3c6a..c1e45c0bb186 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c @@ -231,8 +231,7 @@ int window_protected(struct bat_priv *bat_priv, int32_t seq_num_diff, { if ((seq_num_diff <= -TQ_LOCAL_WINDOW_SIZE) || (seq_num_diff >= EXPECTED_SEQNO_RANGE)) { - if (time_after(jiffies, *last_reset + - msecs_to_jiffies(RESET_PROTECTION_MS))) { + if (has_timed_out(*last_reset, RESET_PROTECTION_MS)) { *last_reset = jiffies; bat_dbg(DBG_BATMAN, bat_priv, -- cgit v1.2.3