From patchwork Sun Oct 23 17:22:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13016364 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4DD80ECAAA1 for ; Sun, 23 Oct 2022 17:23:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230207AbiJWRXe (ORCPT ); Sun, 23 Oct 2022 13:23:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230456AbiJWRXa (ORCPT ); Sun, 23 Oct 2022 13:23:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E12CC76467 for ; Sun, 23 Oct 2022 10:23:28 -0700 (PDT) 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 411DEB80DB7 for ; Sun, 23 Oct 2022 17:23:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C147C43470; Sun, 23 Oct 2022 17:23:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666545805; bh=oTQX8U0CkCI1jZO7NeZVpll2bILxaj0l8QSH7FuhFX0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JJUTq9FRvFVGhd5OhExYa7LGS/6b1k6o9tqYCjaQecgcblwDMWDbvYBZmeR13tXaN QhSaulSwMahL89JhIyQncXWcsWzQ4fqPt8iRRh8pPvpVocKttPvdR56KcXpPh+aUSB wzHLhcx3raa4UViTY93Z2aAu3IV08oLBQTJ6keJ/brxFfGEiUR1GZZ0xWwI1zaRCBu 3GbAGuHXQ5+Q4oAZbf4NX36kmfqZA8YtVNFeU0HK088ltCQOliVJ6yHrds+PZOo2sY MiygB48bX5ngdRgCVmB+vRv/8nwNBOUoVJYDafp39zySTqik1+98WBDfPQUGNWuqMJ cbnnO4BEspOQg== From: Leon Romanovsky To: "David S . Miller" , Jakub Kicinski Cc: Leon Romanovsky , Eric Dumazet , netdev@vger.kernel.org, Paolo Abeni , Saeed Mahameed Subject: [PATCH net-next 3/6] net/mlx5e: Don't access directly DMA device pointer Date: Sun, 23 Oct 2022 20:22:55 +0300 Message-Id: <18c347546df19a654fa6275ce9252db3db861398.1666545480.git.leonro@nvidia.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Leon Romanovsky Use specialized helper to fetch DMA device pointer. Signed-off-by: Leon Romanovsky --- drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c index 41970067917b..4831a3e9556c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c @@ -186,7 +186,7 @@ static int mlx5e_macsec_aso_reg_mr(struct mlx5_core_dev *mdev, struct mlx5e_macs return err; } - dma_device = &mdev->pdev->dev; + dma_device = mlx5_core_dma_dev(mdev); dma_addr = dma_map_single(dma_device, umr->ctx, sizeof(umr->ctx), DMA_BIDIRECTIONAL); err = dma_mapping_error(dma_device, dma_addr); if (err) {