Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1279467

[PATCH 1/3] xen/gntdev: constify mmu_notifier_ops structures

From Julia Lawall <Julia.Lawall@lip6.fr>
Newsgroups linux.kernel
Subject [PATCH 1/3] xen/gntdev: constify mmu_notifier_ops structures
Date 2015-11-29 23:20 +0100
Message-ID <qAiu6-3rA-15@gated-at.bofh.it> (permalink)
References <qAiu6-3rA-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This mmu_notifier_ops structure is never modified, so declare it as
const, like the other mmu_notifier_ops structures.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
The patches in this series are independent of each other.

 drivers/xen/gntdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c
index 2ea0b3b..a27a9a5 100644
--- a/drivers/xen/gntdev.c
+++ b/drivers/xen/gntdev.c
@@ -518,7 +518,7 @@ static void mn_release(struct mmu_notifier *mn,
 	mutex_unlock(&priv->lock);
 }
 
-static struct mmu_notifier_ops gntdev_mmu_ops = {
+static const struct mmu_notifier_ops gntdev_mmu_ops = {
 	.release                = mn_release,
 	.invalidate_page        = mn_invl_page,
 	.invalidate_range_start = mn_invl_range_start,

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] constify mmu_notifier_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-29 23:20 +0100
  [PATCH 1/3] xen/gntdev: constify mmu_notifier_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-29 23:20 +0100
    Re: [Xen-devel] [PATCH 1/3] xen/gntdev: constify mmu_notifier_ops  structures David Vrabel <david.vrabel@citrix.com> - 2015-11-30 15:20 +0100
  [PATCH 3/3] IB/core: constify mmu_notifier_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-29 23:20 +0100
  [PATCH 2/3] iommu/amd: constify mmu_notifier_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-29 23:20 +0100

csiph-web