net/mlx5: Use to_delayed_work()
Subsystems (4)
PATCH v2 1/1 net/mlx5: Use to_delayed_work()
Use to_delayed_work() instead of open-coding it.
---
Changelog:
v1 -> v2:
1. Specify the target tree.
--- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx5/core/cmd.c +1 -2
@@ -927,8 +927,7 @@ static void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool forcestatic 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);
Signature · 1 line
2.25.1
Quoted 18 lines · Chen Ni
Use
to_delayed_work()instead of open-coding it.Signed-off-by Chen Ni <[email protected]>---
Changelog:v1 -> v2:
1. Specify the target tree.
--- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/ethernet/mellanox/mlx5/core/cmd.c +0
-0
drivers/net/ethernet/mellanox/mlx5/core/cmd.c static void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool force · line 933
Quoted 9 lines
drivers/net/ethernet/mellanox/mlx5/core/cmd.c +1
-2@@ -927,8 +927,7 @@ static void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool forcestatic 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);
Quoted 18 lines · Chen Ni
Use
to_delayed_work()instead of open-coding it.Signed-off-by Chen Ni <[email protected]>---
Changelog:v1 -> v2:
1. Specify the target tree.
--- drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/net/ethernet/mellanox/mlx5/core/cmd.c +0
-0
drivers/net/ethernet/mellanox/mlx5/core/cmd.c static void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool force · line 933
Quoted 9 lines
drivers/net/ethernet/mellanox/mlx5/core/cmd.c +1
-2@@ -927,8 +927,7 @@ static void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool forcestatic 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);
Thanks for your patch.
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · 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 <[email protected]>---
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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html