]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
RDMA/mlx4: Use secs_to_jiffies() instead of open-coding
authorRohit Chavan <roheetchavan@gmail.com>
Tue, 5 May 2026 07:53:07 +0000 (13:23 +0530)
committerLeon Romanovsky <leon@kernel.org>
Mon, 18 May 2026 08:58:41 +0000 (04:58 -0400)
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>
Link: https://patch.msgid.link/20260505075308.1754861-1-roheetchavan@gmail.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx4/alias_GUID.c

index c6e1b9e4122a66aa0615e954caefe1e039e8437a..fc23960cf1fd0c7d6d96788e67676d8cc55e6efe 100644 (file)
@@ -437,7 +437,7 @@ out:
                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);