* [PATCH net-next v2] net/mlx5: Use to_delayed_work()
@ 2025-05-14 7:24 Chen Ni
2025-05-14 7:37 ` Mark Bloch
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Chen Ni @ 2025-05-14 7:24 UTC (permalink / raw)
To: saeedm, leon, tariqt, andrew+netdev, davem, edumazet, kuba,
pabeni
Cc: netdev, linux-rdma, linux-kernel, Chen Ni
Use to_delayed_work() instead of open-coding it.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
Changelog:
v1 -> v2:
1. Specify the target tree.
---
drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index e53dbdc0a7a1..b1aeea7c4a91 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@ -927,8 +927,7 @@ static void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool force
static void cb_timeout_handler(struct work_struct *work)
{
- struct delayed_work *dwork = container_of(work, struct delayed_work,
- work);
+ struct delayed_work *dwork = to_delayed_work(work);
struct mlx5_cmd_work_ent *ent = container_of(dwork,
struct mlx5_cmd_work_ent,
cb_timeout_work);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2] net/mlx5: Use to_delayed_work()
2025-05-14 7:24 [PATCH net-next v2] net/mlx5: Use to_delayed_work() Chen Ni
@ 2025-05-14 7:37 ` Mark Bloch
2025-05-15 6:23 ` Tariq Toukan
2025-05-15 15:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Mark Bloch @ 2025-05-14 7:37 UTC (permalink / raw)
To: Chen Ni, saeedm, leon, tariqt, andrew+netdev, davem, edumazet,
kuba, pabeni
Cc: netdev, linux-rdma, linux-kernel
On 14/05/2025 10:24, Chen Ni wrote:
> Use to_delayed_work() instead of open-coding it.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> Changelog:
>
> v1 -> v2:
>
> 1. Specify the target tree.
> ---
> drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> index e53dbdc0a7a1..b1aeea7c4a91 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> @@ -927,8 +927,7 @@ static void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool force
>
> static void cb_timeout_handler(struct work_struct *work)
> {
> - struct delayed_work *dwork = container_of(work, struct delayed_work,
> - work);
> + struct delayed_work *dwork = to_delayed_work(work);
> struct mlx5_cmd_work_ent *ent = container_of(dwork,
> struct mlx5_cmd_work_ent,
> cb_timeout_work);
Acked-by: Mark Bloch <mbloch@nvidia.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2] net/mlx5: Use to_delayed_work()
2025-05-14 7:24 [PATCH net-next v2] net/mlx5: Use to_delayed_work() Chen Ni
2025-05-14 7:37 ` Mark Bloch
@ 2025-05-15 6:23 ` Tariq Toukan
2025-05-15 15:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Tariq Toukan @ 2025-05-15 6:23 UTC (permalink / raw)
To: Chen Ni, saeedm, leon, tariqt, andrew+netdev, davem, edumazet,
kuba, pabeni
Cc: netdev, linux-rdma, linux-kernel
On 14/05/2025 10:24, Chen Ni wrote:
> Use to_delayed_work() instead of open-coding it.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> Changelog:
>
> v1 -> v2:
>
> 1. Specify the target tree.
> ---
> drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> index e53dbdc0a7a1..b1aeea7c4a91 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
> @@ -927,8 +927,7 @@ static void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool force
>
> static void cb_timeout_handler(struct work_struct *work)
> {
> - struct delayed_work *dwork = container_of(work, struct delayed_work,
> - work);
> + struct delayed_work *dwork = to_delayed_work(work);
> struct mlx5_cmd_work_ent *ent = container_of(dwork,
> struct mlx5_cmd_work_ent,
> cb_timeout_work);
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Thanks for your patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next v2] net/mlx5: Use to_delayed_work()
2025-05-14 7:24 [PATCH net-next v2] net/mlx5: Use to_delayed_work() Chen Ni
2025-05-14 7:37 ` Mark Bloch
2025-05-15 6:23 ` Tariq Toukan
@ 2025-05-15 15:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-15 15:20 UTC (permalink / raw)
To: Chen Ni
Cc: saeedm, leon, tariqt, andrew+netdev, davem, edumazet, kuba,
pabeni, netdev, linux-rdma, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 14 May 2025 15:24:19 +0800 you wrote:
> Use to_delayed_work() instead of open-coding it.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> Changelog:
>
> v1 -> v2:
>
> [...]
Here is the summary with links:
- [net-next,v2] net/mlx5: Use to_delayed_work()
https://git.kernel.org/netdev/net-next/c/ee39bae6c141
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-05-15 15:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14 7:24 [PATCH net-next v2] net/mlx5: Use to_delayed_work() Chen Ni
2025-05-14 7:37 ` Mark Bloch
2025-05-15 6:23 ` Tariq Toukan
2025-05-15 15:20 ` 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