summaryrefslogtreecommitdiff
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
authorJack Wang <jinpu.wang@ionos.com>2021-11-24 11:10:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-27 13:04:07 +0300
commita2e525d618012a7070af633e138e235d2065909a (patch)
treebc55a145690044a45b0981638aee35d8d039ba79 /drivers/infiniband/ulp
parent278df2c08602cfc7f1db74394d93c12e4fe4cbd1 (diff)
downloadlinux-a2e525d618012a7070af633e138e235d2065909a.tar.xz
RDMA/rtrs-clt: Fix the initial value of min_latency
[ Upstream commit 925cac6358677d3d64f9b25f205eeb3d31c9f7f8 ] The type of min_latency is ktime_t, so use KTIME_MAX to initialize the initial value. Fixes: dc3b66a0ce70 ("RDMA/rtrs-clt: Add a minimum latency multipath policy") Link: https://lore.kernel.org/r/20211124081040.19533-1-jinpu.wang@ionos.com Signed-off-by: Jack Wang <jinpu.wang@ionos.com> Reviewed-by: Guoqing Jiang <Guoqing.Jiang@linux.dev> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/rtrs/rtrs-clt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
index bc8824b4ee0d..55ebe01ec995 100644
--- a/drivers/infiniband/ulp/rtrs/rtrs-clt.c
+++ b/drivers/infiniband/ulp/rtrs/rtrs-clt.c
@@ -867,7 +867,7 @@ static struct rtrs_clt_sess *get_next_path_min_latency(struct path_it *it)
struct rtrs_clt_sess *min_path = NULL;
struct rtrs_clt *clt = it->clt;
struct rtrs_clt_sess *sess;
- ktime_t min_latency = INT_MAX;
+ ktime_t min_latency = KTIME_MAX;
ktime_t latency;
list_for_each_entry_rcu(sess, &clt->paths_list, s.entry) {