Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3635363pxb; Mon, 24 Jan 2022 14:04:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxclH3h1ZXQEiw57eqlcuMMfTvMEQtlSzhwYJ+91kT04dJJmE6vp4HsqwNG741kdmkK9ub1 X-Received: by 2002:a17:902:758d:b0:14a:aef3:b5c5 with SMTP id j13-20020a170902758d00b0014aaef3b5c5mr16222906pll.21.1643061852504; Mon, 24 Jan 2022 14:04:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643061852; cv=none; d=google.com; s=arc-20160816; b=p8N0cIh9hGlNXEKEr14qLGm1+wjE/r8DSwnM8O9vWIkepw4BRhxuHRGK5ywIW37juU pKvT1sJBa1TCEpcexNJ1nD/oAL5ueQVOmnuK4t9vTF0EVjijAi3XDQkMPtN6EkLM7XD9 no/t8Et5YH4rU3DSTSndhjd+ssSWDtTVaE2bY9szmrU9DShj+bJaroNhamkHw9MDUhA2 UYOhqW+s2L4vMS0RuNfzP7ZDCw1KhYHJ/WbSyIVyo5a4wRLBpIgYPLYGTWX6+UNE5s6A dC8G87Yje0XYC5LTeUFbm5UsSXKbZfao/C2NngYRGBhQSVs8qNq5s4gqr1IWusf2IuZY 2KeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yUpcVggNp2Qs/lIE6kNXfByCxvCNqFDcXrtuMMsLv2A=; b=UvlXc3v/RNzU+S7qvZL2QF9ueBi15qPd98IQ6f4R6+Nj5zhrWDKjCqrgREUy6xp6FZ 1eMN5IFbu072WkZMDZ45/0Fo5Mc+wa4q6xHmy1LNmDcwMORW792TCt/qkScgRnHM1XYc 7hLj988xItsyvE/u8+YPlLYjHtBGf955b22ghnHDBaNbkPL51mF1Wkb8tt0z+zU3Hwcd Mp5o7+frRp0AD6DeJqAz0pd1Cyx3eG57aK2RTOc1S6WW6V2hxVirTs3R7mRfgz9ACjT2 WZBnL06FsB6A2XBjh4n4YDvm+BvI9jdJdAT3acKpzmhRBcOPcWv5B4xKF26jCAhTHY/5 mMrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xjOgep8r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si17342537plh.339.2022.01.24.14.03.46; Mon, 24 Jan 2022 14:04:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xjOgep8r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1575255AbiAXVvM (ORCPT + 99 others); Mon, 24 Jan 2022 16:51:12 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:38842 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1449726AbiAXVQF (ORCPT ); Mon, 24 Jan 2022 16:16:05 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A8292611C8; Mon, 24 Jan 2022 21:16:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6249AC340E4; Mon, 24 Jan 2022 21:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058964; bh=0pMuCKPO/MhYjB/3MEoZSaWEvbcXKnkvLaoassEfGl4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xjOgep8rP8b7XmOx/qYM4OmmuaS1mQrbTw59OP2jPYwx+H/cKKTBKwHDTS8BN0KsU lfr0wk0PD4wX9Gl0J3nTAvfhVUHwa9GSgxBvVXG8o1qzsAniBBZf12Wvkseri8Jucf 77D5rNuJyI76RjUZdterFIkfDMb+zgZJPX7J9sVQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jack Wang , Guoqing Jiang , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.16 0459/1039] RDMA/rtrs-clt: Fix the initial value of min_latency Date: Mon, 24 Jan 2022 19:37:28 +0100 Message-Id: <20220124184140.723253545@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jack Wang [ 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 Reviewed-by: Guoqing Jiang Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/ulp/rtrs/rtrs-clt.c b/drivers/infiniband/ulp/rtrs/rtrs-clt.c index 15c0077dd27eb..e39709dee179d 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) { -- 2.34.1