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=-12.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 317A5C433E2 for ; Fri, 28 Aug 2020 11:13:22 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F2F11207DF for ; Fri, 28 Aug 2020 11:13:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F2F11207DF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C2D6E86DC6; Fri, 28 Aug 2020 11:13:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qgXjTFSoGzhE; Fri, 28 Aug 2020 11:13:21 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 51C7C86D5B; Fri, 28 Aug 2020 11:13:21 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2F788C016F; Fri, 28 Aug 2020 11:13:21 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id AC81DC0051 for ; Fri, 28 Aug 2020 11:13:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 94A1986DC6 for ; Fri, 28 Aug 2020 11:13:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id be7rD2peXxbL for ; Fri, 28 Aug 2020 11:13:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 55A3486D5B for ; Fri, 28 Aug 2020 11:13:15 +0000 (UTC) IronPort-SDR: 71bp9XE76PfEPrXtZBvglUKV4mJdxw/3nTziePq140dPnJS5MoffRBO8mZnZE3XOqogdkIQhMk h4G7pGyhqljA== X-IronPort-AV: E=McAfee;i="6000,8403,9726"; a="136711191" X-IronPort-AV: E=Sophos;i="5.76,363,1592895600"; d="scan'208";a="136711191" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Aug 2020 04:13:14 -0700 IronPort-SDR: eZzUmeMtN4aVFi8u6VajLQELVFynrJzK4ab5Ecfxm/ukKE+94MUdQQmo8T8tMJ0LYoTfCQC3XD LjOmk8K/vKJw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,363,1592895600"; d="scan'208";a="313571214" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 28 Aug 2020 04:13:13 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 91B311B4; Fri, 28 Aug 2020 14:13:12 +0300 (EEST) From: Andy Shevchenko To: Joerg Roedel , iommu@lists.linux-foundation.org Subject: [PATCH v1] iommu/dma: Use DMA ops setter instead of direct assignment Date: Fri, 28 Aug 2020 14:13:10 +0300 Message-Id: <20200828111310.8032-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Cc: Andy Shevchenko X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Use DMA ops setter instead of direct assignment. Even we know that this module doesn't perform access to the dma_ops member of struct device, it's better to use setter to avoid potential problems in the future. Signed-off-by: Andy Shevchenko --- drivers/iommu/dma-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c index 5141d49a046b..2dcbc8f1d0c0 100644 --- a/drivers/iommu/dma-iommu.c +++ b/drivers/iommu/dma-iommu.c @@ -1153,7 +1153,7 @@ void iommu_setup_dma_ops(struct device *dev, u64 dma_base, u64 size) if (domain->type == IOMMU_DOMAIN_DMA) { if (iommu_dma_init_domain(domain, dma_base, size, dev)) goto out_err; - dev->dma_ops = &iommu_dma_ops; + set_dma_ops(dev, &iommu_dma_ops); } return; -- 2.28.0 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu