Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3978106pxb; Tue, 25 Jan 2022 00:29:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzly+RQsJtdYk4GFzHvHbOpn/vKYSxed6H+/Th3Gzoo+yUeuxDXmWfqpHoulWT+THd2/fWi X-Received: by 2002:a17:902:d48b:b0:14b:53c9:da09 with SMTP id c11-20020a170902d48b00b0014b53c9da09mr7569113plg.1.1643099391369; Tue, 25 Jan 2022 00:29:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643099391; cv=none; d=google.com; s=arc-20160816; b=ZpcqrvEUNq/pLQVo/zl+gYbiwMMXzlNwBjT4g4BOtaMDqZbPzbcnGrX0To06BRO1Uh 19cBdblCZyVpKknKnRxBlegEQxsILsS+tuFSUlwmBjCtTk9B4bs+vybt1CVqcbsOeyts x+Qzq/3S+B9DNB27lLeWLmC+A1nEtU9g+wt7zoVoCU5xlbSZNZGu+5pJqF5F+HX4yR9i ZrnaLcSW9ro7IdNWXOiZQCzTZPgijuE6YNCWc8W65YUFnV4X+ugIpIRGemHk1NFnyeH+ 8Em70v4qbEtFs3cILm4/cPGg1wr3skHLc1WhKCi0YhotsUCPAcZZmTO3THexSUe7T0dh VT3w== 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=Yw79EtWKfhDggs++qH6gKz75hrDZkjxAeHdU1y3Y5e8=; b=SISoJkQcE1KxTgRkcAyTzyvhVX2t0fviaUlswDjOnFggE6qYTfKTxNeGnHafOa5oFi oX4JQAKFHM31d4xcKPAiF29HPE0bPvjCP9rduNzBiXjX9281jzt23Mjl668qfGgnf1kI ltqVkFqhhKImmVQmef1pdZJD/pnQQTVpyTmT3YfBNdmU4847UN5Y/3gcR35dlNKxPRYd ADJ0WorannxBHftLcr0TW3WurX0Y1myvhjvX2EuX3lOTezOji/QHk6gQ7wcjv5C5eu1A gjUwKTZZTLJhCsm6MY8CjBfqxWGStjl3MbJjWtRayBRQm697Qun4xF6IZf2pp5FlrSpS j6aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=npKK6PbX; 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 g127si15457590pgc.526.2022.01.25.00.29.39; Tue, 25 Jan 2022 00:29:51 -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=npKK6PbX; 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 S1344529AbiAYCdf (ORCPT + 99 others); Mon, 24 Jan 2022 21:33:35 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:35530 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356240AbiAXU3N (ORCPT ); Mon, 24 Jan 2022 15:29:13 -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 ams.source.kernel.org (Postfix) with ESMTPS id 33606B81257; Mon, 24 Jan 2022 20:29:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 677C2C340E5; Mon, 24 Jan 2022 20:29:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056150; bh=QcleD3Xl2DWJeZNgOOnzuLP8XHdGsxum61Y2eVgQT0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=npKK6PbX2NbsTAQH3L6aXsUBb1QjD4i7Mqx9YoK1K0P5hw+gpwm4wbIjHNbSNSwGz VSbAYHIaflidNSnmobq13Z/lIS6om2pZtwmcO994MNU2T29W88qVmVXbcnQseV/OYd pajJaiw8u1OMv3P+xsBUSAx1QnNB1R9UyKuVejZY= 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.15 387/846] RDMA/rtrs-clt: Fix the initial value of min_latency Date: Mon, 24 Jan 2022 19:38:24 +0100 Message-Id: <20220124184114.287284065@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 bc8824b4ee0d4..55ebe01ec9951 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