public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] iommu/vt-d: constify intel_dma_ops
@ 2017-06-28 11:09 Arvind Yadav
  2017-06-28 12:17 ` Joerg Roedel
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-06-28 11:09 UTC (permalink / raw)
  To: dwmw2, joro; +Cc: linux-kernel, iommu

Most dma_map_ops structures are never modified. Constify these
structures such that these can be write-protected.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] iommu/vt-d: constify intel_dma_ops
  2017-06-28 11:09 [PATCH v2] iommu/vt-d: constify intel_dma_ops Arvind Yadav
@ 2017-06-28 12:17 ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2017-06-28 12:17 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: dwmw2, linux-kernel, iommu

On Wed, Jun 28, 2017 at 04:39:32PM +0530, Arvind Yadav wrote:
> Most dma_map_ops structures are never modified. Constify these
> structures such that these can be write-protected.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
> Changes in v2:
>               Added description.
> 
>  drivers/iommu/intel-iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-28 12:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-28 11:09 [PATCH v2] iommu/vt-d: constify intel_dma_ops Arvind Yadav
2017-06-28 12:17 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox