* [PATCH] net/mlx5: Use to_delayed_work()
@ 2025-05-14 6:34 Chen Ni
2025-05-14 7:00 ` Mark Bloch
0 siblings, 1 reply; 2+ messages in thread
From: Chen Ni @ 2025-05-14 6:34 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>
---
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] 2+ messages in thread
* Re: [PATCH] net/mlx5: Use to_delayed_work()
2025-05-14 6:34 [PATCH] net/mlx5: Use to_delayed_work() Chen Ni
@ 2025-05-14 7:00 ` Mark Bloch
0 siblings, 0 replies; 2+ messages in thread
From: Mark Bloch @ 2025-05-14 7:00 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 9:34, Chen Ni wrote:
> Use to_delayed_work() instead of open-coding it.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> 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);
Please specify the target tree in your future submissions just
as you did with your Prestera patch. For the change itself:
Acked-by: Mark Bloch <mbloch@nvidia.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-14 7:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-14 6:34 [PATCH] net/mlx5: Use to_delayed_work() Chen Ni
2025-05-14 7:00 ` Mark Bloch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox