public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v1] net: amt: convert to use secs_to_jiffies
@ 2025-06-13 10:20 Yuesong Li
  2025-06-13 12:07 ` Joe Damato
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yuesong Li @ 2025-06-13 10:20 UTC (permalink / raw)
  To: Taehee Yoo, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
  Cc: opensource.kernel, Yuesong Li

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v1] net: amt: convert to use secs_to_jiffies
  2025-06-13 10:20 [PATCH net-next v1] net: amt: convert to use secs_to_jiffies Yuesong Li
@ 2025-06-13 12:07 ` Joe Damato
  2025-06-14  2:27 ` Taehee Yoo
  2025-06-14 18:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Joe Damato @ 2025-06-13 12:07 UTC (permalink / raw)
  To: Yuesong Li
  Cc: Taehee Yoo, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
	opensource.kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v1] net: amt: convert to use secs_to_jiffies
  2025-06-13 10:20 [PATCH net-next v1] net: amt: convert to use secs_to_jiffies Yuesong Li
  2025-06-13 12:07 ` Joe Damato
@ 2025-06-14  2:27 ` Taehee Yoo
  2025-06-14 18:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Taehee Yoo @ 2025-06-14  2:27 UTC (permalink / raw)
  To: Yuesong Li
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, netdev, linux-kernel, opensource.kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v1] net: amt: convert to use secs_to_jiffies
  2025-06-13 10:20 [PATCH net-next v1] net: amt: convert to use secs_to_jiffies Yuesong Li
  2025-06-13 12:07 ` Joe Damato
  2025-06-14  2:27 ` Taehee Yoo
@ 2025-06-14 18:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-14 18:30 UTC (permalink / raw)
  To: Yuesong Li
  Cc: ap420073, andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel, opensource.kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Fri, 13 Jun 2025 18:20:12 +0800 you 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(-)

Here is the summary with links:
  - [net-next,v1] net: amt: convert to use secs_to_jiffies
    https://git.kernel.org/netdev/net-next/c/c969149bafbe

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-14 18:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 10:20 [PATCH net-next v1] net: amt: convert to use secs_to_jiffies Yuesong Li
2025-06-13 12:07 ` Joe Damato
2025-06-14  2:27 ` Taehee Yoo
2025-06-14 18:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox