From patchwork Tue Feb 16 05:50:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 12089621 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEF97C433DB for ; Tue, 16 Feb 2021 05:52:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AF1F364DDA for ; Tue, 16 Feb 2021 05:52:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229930AbhBPFvu (ORCPT ); Tue, 16 Feb 2021 00:51:50 -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 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: netdev@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 Reviewed-by: Leon Romanovsky --- 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, static void mlx5v_remove(struct auxiliary_device *adev) { - struct mlx5_vdpa_dev *mvdev = dev_get_drvdata(&adev->dev); + struct mlx5_vdpa_net *ndev = dev_get_drvdata(&adev->dev); - vdpa_unregister_device(&mvdev->vdev); + vdpa_unregister_device(&ndev->mvdev.vdev); } static const struct auxiliary_device_id mlx5v_id_table[] = {