From: Thorsten Blum Date: Fri, 21 Feb 2025 08:53:22 +0000 (+0100) Subject: net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies() X-Git-Tag: v6.15-rc1~160^2~232 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f3f4464ff08f70e959c026fad2f3790abe84be6;p=thirdparty%2Fkernel%2Flinux.git net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies() Use secs_to_jiffies() and simplify the code. Reviewed-by: Jacob Keller Reviewed-by: Saeed Mahameed Signed-off-by: Thorsten Blum Reviewed-by: Tariq Toukan Reviewed-by: Somnath Kotur Link: https://patch.msgid.link/20250221085350.198024-3-thorsten.blum@linux.dev Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c index 3dbd4efa21a2a..19dce1ba512d4 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/bwc.c @@ -220,7 +220,7 @@ static int hws_bwc_queue_poll(struct mlx5hws_context *ctx, bool drain) { unsigned long timeout = jiffies + - msecs_to_jiffies(MLX5HWS_BWC_POLLING_TIMEOUT * MSEC_PER_SEC); + secs_to_jiffies(MLX5HWS_BWC_POLLING_TIMEOUT); struct mlx5hws_flow_op_result comp[MLX5HWS_BWC_MATCHER_REHASH_BURST_TH]; u16 burst_th = hws_bwc_get_burst_th(ctx, queue_id); bool got_comp = *pending_rules >= burst_th;