Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [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

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