Skip to contentSkip to conversation

RDMA/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies()

PATCH Superseded Thorsten Blum 2 participants 2 messages Feb 19, 2025 – Apr 7, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RDMA/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies()

Use secs_to_jiffies() and simplify the code.

---
 drivers/infiniband/hw/mlx5/mr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/mr.c +1 -1
index bb02b6adbf2c..b526e322c7b0 100644
@@ -2033,7 +2033,7 @@ static int mlx5_revoke_mr(struct mlx5_ib_mr *mr)
 		spin_lock_irq(&ent->mkeys_queue.lock);
 		if (ent->is_tmp && !ent->tmp_cleanup_scheduled) {
 			mod_delayed_work(ent->dev->cache.wq, &ent->dwork,
-					 msecs_to_jiffies(30 * 1000));
+					 secs_to_jiffies(30));
 			ent->tmp_cleanup_scheduled = true;
 		}
 		spin_unlock_irq(&ent->mkeys_queue.lock);
Signature · 1 line
2.48.1
maintainer
#1 lore raw
Quoted 6 lines · Thorsten Blum

Use secs_to_jiffies() and simplify the code.

---
 drivers/infiniband/hw/mlx5/mr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I took another version of this because it got more of the msecs_to_jiffies calls than this one.

Jason