Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5461900pxb; Mon, 15 Feb 2021 21:54:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0mJBg+ykOy6s67nbAQEVsTfbXeWbj3FnQtnAI2mS5iHfCo3X/OIfgruJKBoH6KF4y5M5i X-Received: by 2002:a17:906:a20e:: with SMTP id r14mr18850845ejy.404.1613454890713; Mon, 15 Feb 2021 21:54:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613454890; cv=none; d=google.com; s=arc-20160816; b=ifq09qdAAvO8CZQx32NzUn5S7MD7/kRDhOGq3kjG6zaj/mo+sU9tXipa7uwIFr5He8 yZdtR2u8FbVpzLe1NYbl0H+6NjKewT59gi2Ujz5PIqV8MNGMMBE/HUxaJQ9KOfVMkIod yc3wJC1NvlKltcFRPXj/XzJgScfKmJ6uuXPFErNLsDY6xzzuZgcvpw4Cfoi7l5ZiHNWa 4lu9Y7U96Kmj6fETRsVCN1Bv2c5qdKaNi/GSCAUyLPoiMYlR8Q87Kdpx4jvkn9bVZqXP NJCe0D9I3hxfBkPyQQEwJwJAahDa95zT6yXDwb7kFukSBSjHgoDcPd4mZm75DzYPp4HX mM+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:dkim-signature:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=Emqf4hRPWOz3zcBqDWDIklUs7r/QR5F0BAA/Zmha8aY=; b=Yb5X8IQsu0edcMu4Kaji/I50EJ60SC+NZWOJhf2Nza2Bak1QkQCAWI7QJ6Mi3wwvoQ Ga6LYu5bHhBYq44vABkQnARsh5019+G83O6VgFcTTVw8wISYm3bLfRkY8QBeVWiXZ1jK 6aI0Ngn1rcY47Z26liwuSPSppiVa2dXqB3n4RnqPMpIE4RTz/htWPP9y13CGLTZqaMO1 nK/vXvyGZM0k68tfcfY+U0OoaDhMl09jKz+UdPXIQUHnLYvLE4AuOqqUmZ7gBZllUxDA loCF4uhJ4CVQ65wAISLkkVF8rw53uy6Gyrs0WBvdv9Iuv4fzFf6oD932XtJM9phVgzJS Ks4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=ceXITBkc; 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=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si652262ejx.434.2021.02.15.21.54.27; Mon, 15 Feb 2021 21:54:50 -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=@nvidia.com header.s=n1 header.b=ceXITBkc; 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=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229806AbhBPFvJ (ORCPT + 99 others); Tue, 16 Feb 2021 00:51:09 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:5087 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbhBPFvI (ORCPT ); Tue, 16 Feb 2021 00:51:08 -0500 Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Mon, 15 Feb 2021 21:50:28 -0800 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 16 Feb 2021 05:50:27 +0000 Received: from vdi.nvidia.com (172.20.145.6) by mail.nvidia.com (172.20.187.13) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 16 Feb 2021 05:50:25 +0000 From: Eli Cohen To: , , , , CC: , Subject: [PATCH] vdpa/mlx5: Extract correct pointer from driver data Date: Tue, 16 Feb 2021 07:50:21 +0200 Message-ID: <20210216055022.25248-1-elic@nvidia.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1613454628; bh=Emqf4hRPWOz3zcBqDWDIklUs7r/QR5F0BAA/Zmha8aY=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:Content-Type; b=ceXITBkcExD5YAhFK/bhl+Fze+EBOHLzaXdaCTdXS9xwQniinz1nfQRHTBMDPwfPz XXzpmhCPLUcG+h9A8cHdLBq9JcIMN9nTRF9NxUHd2RK3eM9jVtz90OidwdDsC2SdN4 HTsenOR0tdJEn1pZujjbgSEXgyUKccMK+/w/EaODdIJjnlmoOIaVSNg+QYsVsiITwz DTTYfrTddTbYDqPIrydsvr6ZmFMWj/mb/4iUMbFbZOulxdUX+Cx/IVTCl7Uy0nS1Na eXx0Ecp2G0936WL3nILQVChWOuIpsnE2Nkpxw0bgUlP4fGPrYoTxV7ShZ5ZuWhGdOH 3EqI/QqsuwUoQ== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well in mlx5v_remove(). Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus") Signed-off-by: Eli Cohen --- drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5= _vnet.c index 6b0a42183622..4103d3b64a2a 100644 --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c @@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev, =20 static void mlx5v_remove(struct auxiliary_device *adev) { - struct mlx5_vdpa_dev *mvdev =3D dev_get_drvdata(&adev->dev); + struct mlx5_vdpa_net *ndev =3D dev_get_drvdata(&adev->dev); =20 - vdpa_unregister_device(&mvdev->vdev); + vdpa_unregister_device(&ndev->mvdev.vdev); } =20 static const struct auxiliary_device_id mlx5v_id_table[] =3D { --=20 2.29.2