Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751537AbdF1LK1 (ORCPT ); Wed, 28 Jun 2017 07:10:27 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35421 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751498AbdF1LKX (ORCPT ); Wed, 28 Jun 2017 07:10:23 -0400 From: Arvind Yadav To: dwmw2@infradead.org, joro@8bytes.org Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org Subject: [PATCH v2] iommu/vt-d: constify intel_dma_ops Date: Wed, 28 Jun 2017 16:39:32 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 778 Lines: 26 Most dma_map_ops structures are never modified. Constify these structures such that these can be write-protected. Signed-off-by: Arvind Yadav --- Changes in v2: Added description. drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 90ab011..de0df48 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3970,7 +3970,7 @@ static int intel_mapping_error(struct device *dev, dma_addr_t dma_addr) return !dma_addr; } -struct dma_map_ops intel_dma_ops = { +const struct dma_map_ops intel_dma_ops = { .alloc = intel_alloc_coherent, .free = intel_free_coherent, .map_sg = intel_map_sg, -- 1.9.1