41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
From 5447a8c66fd43b005c3f33fe8b63145af1ce5893 Mon Sep 17 00:00:00 2001
|
|
From: Kamal Heib <kheib@redhat.com>
|
|
Date: Thu, 16 Apr 2026 17:42:06 -0400
|
|
Subject: [PATCH] net/mlx5: Use to_delayed_work()
|
|
|
|
JIRA: https://redhat.atlassian.net/browse/RHEL-169055
|
|
|
|
commit ee39bae6c141876f5b4c001f6b12b4f8ffb4cd08
|
|
Author: Chen Ni <nichen@iscas.ac.cn>
|
|
Date: Wed May 14 15:24:19 2025 +0800
|
|
|
|
net/mlx5: Use to_delayed_work()
|
|
|
|
Use to_delayed_work() instead of open-coding it.
|
|
|
|
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
|
|
Acked-by: Mark Bloch <mbloch@nvidia.com>
|
|
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
|
|
Link: https://patch.msgid.link/20250514072419.2707578-1-nichen@iscas.ac.cn
|
|
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
|
|
|
Signed-off-by: Kamal Heib <kheib@redhat.com>
|
|
|
|
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.50.1 (Apple Git-155)
|
|
|