Re: [PATCH net-next v1] net: amt: convert to use secs_to_jiffies

From: Joe Damato
Date: Fri Jun 13 2025 - 08:08:14 EST


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@xxxxxxxx>
> ---
> 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@xxxxxxx>

[1]: https://www.kernel.org/doc/html/v6.15/process/submitting-patches.html