drivers/net/amt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Since secs_to_jiffies()(commit:b35108a51cf7) has been introduced, we can
use it to avoid scaling the time to msec.
Signed-off-by: Yuesong Li <liyuesong@vivo.com>
---
drivers/net/amt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/amt.c b/drivers/net/amt.c
index 734a0b3242a9..fb130fde68c0 100644
--- a/drivers/net/amt.c
+++ b/drivers/net/amt.c
@@ -979,7 +979,7 @@ static void amt_event_send_request(struct amt_dev *amt)
amt->req_cnt++;
out:
exp = min_t(u32, (1 * (1 << amt->req_cnt)), AMT_MAX_REQ_TIMEOUT);
- mod_delayed_work(amt_wq, &amt->req_wq, msecs_to_jiffies(exp * 1000));
+ mod_delayed_work(amt_wq, &amt->req_wq, secs_to_jiffies(exp));
}
static void amt_req_work(struct work_struct *work)
--
2.34.1
On Fri, Jun 13, 2025 at 7:20 PM Yuesong Li <liyuesong@vivo.com> wrote: > Hi Yuesong, Thanks a lot for your work! > Since secs_to_jiffies()(commit:b35108a51cf7) has been introduced, we can > use it to avoid scaling the time to msec. > > Signed-off-by: Yuesong Li <liyuesong@vivo.com> Reviewed-by: Taehee Yoo <ap420073@gmail.com> Thanks, Taehee Yoo
On Fri, Jun 13, 2025 at 06:20:12PM +0800, Yuesong Li wrote: > Since secs_to_jiffies()(commit:b35108a51cf7) has been introduced, we can > use it to avoid scaling the time to msec. > > Signed-off-by: Yuesong Li <liyuesong@vivo.com> > --- > drivers/net/amt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/amt.c b/drivers/net/amt.c > index 734a0b3242a9..fb130fde68c0 100644 > --- a/drivers/net/amt.c > +++ b/drivers/net/amt.c > @@ -979,7 +979,7 @@ static void amt_event_send_request(struct amt_dev *amt) > amt->req_cnt++; > out: > exp = min_t(u32, (1 * (1 << amt->req_cnt)), AMT_MAX_REQ_TIMEOUT); > - mod_delayed_work(amt_wq, &amt->req_wq, msecs_to_jiffies(exp * 1000)); > + mod_delayed_work(amt_wq, &amt->req_wq, secs_to_jiffies(exp)); > } > > static void amt_req_work(struct work_struct *work) Seems fine, but minor nit on the commit message -- when referring to commit you should include the one-liner as per the documentation [1]. For example, maybe something like: Since commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()"), ... Otherwise: Reviewed-by: Joe Damato <joe@dama.to> [1]: https://www.kernel.org/doc/html/v6.15/process/submitting-patches.html
© 2016 - 2025 Red Hat, Inc.