From nobody Thu Apr 2 11:43:07 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A63BC6FA82 for ; Mon, 26 Sep 2022 01:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233217AbiIZBwT (ORCPT ); Sun, 25 Sep 2022 21:52:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230128AbiIZBwR (ORCPT ); Sun, 25 Sep 2022 21:52:17 -0400 Received: from unicom146.biz-email.net (unicom146.biz-email.net [210.51.26.146]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3D2E2B1A1 for ; Sun, 25 Sep 2022 18:52:15 -0700 (PDT) Received: from ([60.208.111.195]) by unicom146.biz-email.net ((D)) with ASMTP (SSL) id UAA00010; Mon, 26 Sep 2022 09:52:10 +0800 Received: from localhost.localdomain (10.200.104.97) by jtjnmail201612.home.langchao.com (10.100.2.12) with Microsoft SMTP Server id 15.1.2507.12; Mon, 26 Sep 2022 09:52:11 +0800 From: Bo Liu To: , , CC: , Bo Liu Subject: [PATCH] habanalabs: Use simplified API for p2p dist calc Date: Sun, 25 Sep 2022 21:52:08 -0400 Message-ID: <20220926015208.3794-1-liubo03@inspur.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Originating-IP: [10.200.104.97] tUid: 2022926095210313cce5187fcc4c8f93a89f569eab40d X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the simplified API that calculates distance between two devices. Signed-off-by: Bo Liu --- drivers/misc/habanalabs/common/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/habanalabs/common/memory.c b/drivers/misc/habanal= abs/common/memory.c index ef28f3b37b93..99b1d6ce26ae 100644 --- a/drivers/misc/habanalabs/common/memory.c +++ b/drivers/misc/habanalabs/common/memory.c @@ -1689,7 +1689,7 @@ static int hl_dmabuf_attach(struct dma_buf *dmabuf, hl_dmabuf =3D dmabuf->priv; hdev =3D hl_dmabuf->ctx->hdev; =20 - rc =3D pci_p2pdma_distance_many(hdev->pdev, &attachment->dev, 1, true); + rc =3D pci_p2pdma_distance(hdev->pdev, attachment->dev, true); =20 if (rc < 0) attachment->peer2peer =3D false; --=20 2.27.0