Messages in this thread Patch in this message |  | | From | Rohit Chavan <> | | Subject | [PATCH] RDMA/mlx4: Use secs_to_jiffies() instead of open-coding | | Date | Tue, 5 May 2026 13:23:07 +0530 |
| |
The conversion from seconds to jiffies is currently performed by multiplying the value by 1000 and passing it to msecs_to_jiffies().
Use the more direct secs_to_jiffies() helper instead. This simplifies the code, improves readability, and avoids the manual multiplication step by using the dedicated kernel API.
Signed-off-by: Rohit Chavan <roheetchavan@gmail.com> --- drivers/infiniband/hw/mlx4/alias_GUID.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx4/alias_GUID.c b/drivers/infiniband/hw/mlx4/alias_GUID.c index c6e1b9e4122a..fc23960cf1fd 100644 --- a/drivers/infiniband/hw/mlx4/alias_GUID.c +++ b/drivers/infiniband/hw/mlx4/alias_GUID.c @@ -437,7 +437,7 @@ static void aliasguid_query_handler(int status, queue_delayed_work(dev->sriov.alias_guid.ports_guid[port_index].wq, &dev->sriov.alias_guid.ports_guid[port_index]. alias_guid_work, - msecs_to_jiffies(resched_delay_sec * 1000)); + secs_to_jiffies(resched_delay_sec)); } if (cb_ctx->sa_query) { list_del(&cb_ctx->list); -- 2.34.1
|  |