RDMA/mlx4: Use secs_to_jiffies() instead of open-coding
Subsystems (2)
PATCH 1/1 RDMA/mlx4: Use secs_to_jiffies() instead of open-coding
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.
--- drivers/infiniband/hw/mlx4/alias_GUID.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx4/alias_GUID.c +1 -1
@@ -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);
Signature · 1 line
2.34.1
Leon Romanovsky
AppliedQuoted 8 lines · Rohit Chavan
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.[...]
Applied, thanks!
[1/1] RDMA/mlx4: Use secs_to_jiffies() instead of open-coding
https://git.kernel.org/rdma/rdma/c/8b2a66cb49546c
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>