Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH] RDMA/mlx4: Use secs_to_jiffies() instead of open-coding
@ 2026-05-05  7:53 Rohit Chavan
  2026-05-12 10:38 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Rohit Chavan @ 2026-05-05  7:53 UTC (permalink / raw)
  To: yishaih, Jason Gunthorpe, Leon Romanovsky, linux-rdma,
	linux-kernel
  Cc: 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.

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] RDMA/mlx4: Use secs_to_jiffies() instead of open-coding
  2026-05-05  7:53 [PATCH] RDMA/mlx4: Use secs_to_jiffies() instead of open-coding Rohit Chavan
@ 2026-05-12 10:38 ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2026-05-12 10:38 UTC (permalink / raw)
  To: yishaih, Jason Gunthorpe, linux-rdma, linux-kernel, Rohit Chavan


On Tue, 05 May 2026 13:23:07 +0530, Rohit Chavan wrote:
> 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,
-- 
Leon Romanovsky <leon@kernel.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-12 10:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05  7:53 [PATCH] RDMA/mlx4: Use secs_to_jiffies() instead of open-coding Rohit Chavan
2026-05-12 10:38 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox