Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5463451pxb; Mon, 15 Feb 2021 21:58:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJSDXVZH+WB47AONq+Pvb0eIJE4fLaMcER5omf+n6UevRmPO2NMt4x7mYRoG31LwnYJkt2 X-Received: by 2002:a17:906:40cc:: with SMTP id a12mr588490ejk.327.1613455096271; Mon, 15 Feb 2021 21:58:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613455096; cv=none; d=google.com; s=arc-20160816; b=HQvgp4tSMVacU5RYi4jxW0NGbYAwCJL7LbSTcbUgBhFiO4xFZg5f0XV4Qg/F/ji/tU LNWQXFQdqsU4qn2mmvV7KMGrnOPvlPgWLF8kkWGRKV5AZJU+UGgPQ1Kmjpair0NiQKv8 XsyMLnD4qCfs9SzQDO4iHfoizJeQk8OP74puS3LTIER1BWdCVBaR5Wq/TuqUHRdbOLgS NQsfF62Xu3/u6N7ZUpuSF9OkaYVCAd1S0KP8vqdyEHCY6glNAJD78YzBFgll63RQchXr 4NOz2vsw1gJPne1CAOnpx1zBfsgwN4hCaP61oeI8z1bmOrPN9YyCwF3OAqqFIcj43Fi3 jQzw== 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:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Emqf4hRPWOz3zcBqDWDIklUs7r/QR5F0BAA/Zmha8aY=; b=zMZTgg/mkj9PHZP6xCq4FI/ciRRv7lTRtPA1/DVerQrfgrScmLFJB4dTtDbqOMKUwl aO0fLuL1B6bW07GGHo0ILNKaFv7Rw/gOJE7K9cbdxMoZuYGhbz+6k0E/k+aeDhWQUmK8 vqtK4AE8kHfUagDC9Sjvs2BtzdFgBk2VhpTObyLkCPIt8BPvKG9obghfNU9iDwXiqb7o e2BPWAD+SI2owf6UQ0ss777CVXtA/zVRd1Z6nayg0ruMNkLxJWw6kd4jvO44Qk9lHRIa OSv5G6ZOYt+HM2anN0OXRu3Zoe5j2iePLZXm8t1LoX2Z1Vrsr4LkJ0iZ7JpKnvfj07aC O9TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=g04IISlD; 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.57.52; Mon, 15 Feb 2021 21:58:16 -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=g04IISlD; 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 S229917AbhBPFvt (ORCPT + 99 others); Tue, 16 Feb 2021 00:51:49 -0500 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:5226 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbhBPFvr (ORCPT ); Tue, 16 Feb 2021 00:51:47 -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:51:06 -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:51:06 +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:51:04 +0000 From: Eli Cohen To: , , , , CC: , Subject: [PATCH] vdpa/mlx5: Extract correct pointer from driver data Date: Tue, 16 Feb 2021 07:50:22 +0200 Message-ID: <20210216055022.25248-2-elic@nvidia.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210216055022.25248-1-elic@nvidia.com> References: <20210216055022.25248-1-elic@nvidia.com> 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=1613454666; bh=Emqf4hRPWOz3zcBqDWDIklUs7r/QR5F0BAA/Zmha8aY=; h=From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:Content-Type; b=g04IISlDRh+s9XUrmUzy2fnhKBGdTvzfFC7tJvdB3MoBd/bVuTY0TtSK2s0jyYEnj qV2j23sXeWGYEcO6st/ZlDRrhuxUrOyk9SlZ+1i1ouPZq/XeZWXLjJdED9oAFgWBif LoxuCCnt3afF2X3vHiqtGmlgXGIFgntOMamoMMEqOacnqYyCMnuMfKUWb9Bl1Ifkm5 NBKgrz3sgOVTKiKn6/tew8iF4bzXhdPlmQ9s78oKzyrgv+BFHlrhRO8xiUEMZ9v5+z QkAd6CiVc/JDktCTyaxgu7SlA1a4BVEqBodozN4HgevK+UFM7I0k2tpeC4tNgAvpeg Mjw2Mqm0cMk8A== 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