mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Michael Straube <straube.linux@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 07/11] staging: r8188eu: call msecs_to_jiffies in _set_timer
Date: Sat, 15 Jan 2022 17:55:32 +0100	[thread overview]
Message-ID: <20220115165536.231210-8-martin@kaiser.cx> (raw)
In-Reply-To: <20220115165536.231210-1-martin@kaiser.cx>

The _set_timer wrapper function takes a timeout in milliseconds.
Call msecs_to_jiffies to convert the timeout to jiffies. Don't do
the calculation ourselves.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/include/osdep_service.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
index 754691cb2b12..e52e78b2c6b0 100644
--- a/drivers/staging/r8188eu/include/osdep_service.h
+++ b/drivers/staging/r8188eu/include/osdep_service.h
@@ -56,7 +56,7 @@ static inline struct list_head *get_list_head(struct __queue *queue)
 
 static inline void _set_timer(struct timer_list *ptimer,u32 delay_time)
 {
-	mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
+	mod_timer(ptimer, jiffies + msecs_to_jiffies(delay_time));
 }
 
 static inline int rtw_netif_queue_stopped(struct net_device *pnetdev)
-- 
2.30.2


  parent reply	other threads:[~2022-01-15 16:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-15 16:55 [PATCH 00/11] staging: r8188eu: clean up osdep_service.h Martin Kaiser
2022-01-15 16:55 ` [PATCH 01/11] staging: r8188eu: remove unused externl variables Martin Kaiser
2022-01-15 16:55 ` [PATCH 02/11] staging: r8188eu: remove unused macros Martin Kaiser
2022-01-15 16:55 ` [PATCH 03/11] staging: r8188eu: remove unused bitshift function Martin Kaiser
2022-01-15 16:55 ` [PATCH 04/11] staging: r8188eu: remove unused PATH_LENGTH_MAX define Martin Kaiser
2022-01-15 16:55 ` [PATCH 05/11] staging: r8188eu: remove rtw_list_delete wrapper Martin Kaiser
2022-01-15 16:55 ` [PATCH 06/11] staging: r8188eu: remove _cancel_timer wrapper Martin Kaiser
2022-01-15 16:55 ` Martin Kaiser [this message]
2022-01-15 16:55 ` [PATCH 08/11] staging: r8188eu: remove rtw_netif_wake_queue wrapper Martin Kaiser
2022-01-15 16:55 ` [PATCH 09/11] staging: r8188eu: remove rtw_netif_start_queue wrapper Martin Kaiser
2022-01-15 16:55 ` [PATCH 10/11] staging: r8188eu: remove rtw_netif_stop_queue wrapper Martin Kaiser
2022-01-15 16:55 ` [PATCH 11/11] staging: r8188eu: remove _cancel_timer_ex wrapper Martin Kaiser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220115165536.231210-8-martin@kaiser.cx \
    --to=martin@kaiser.cx \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    --cc=straube.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®