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


Groups > linux.kernel > #1279465 > unrolled thread

[PATCH 0/3] constify mmu_notifier_ops structures

Started byJulia Lawall <Julia.Lawall@lip6.fr>
First post2015-11-29 23:20 +0100
Last post2015-11-29 23:20 +0100
Articles 5 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [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

#1279465 — [PATCH 0/3] constify mmu_notifier_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2015-11-29 23:20 +0100
Subject[PATCH 0/3] constify mmu_notifier_ops structures
Message-ID<qAiu6-3rA-5@gated-at.bofh.it>
mmu_notifier_ops structures are never modified, so declare them all as
const.

---

 drivers/infiniband/core/umem_odp.c |    2 +-
 drivers/iommu/amd_iommu_v2.c       |    2 +-
 drivers/xen/gntdev.c               |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
--
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/

[toc] | [next] | [standalone]


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

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2015-11-29 23:20 +0100
Subject[PATCH 1/3] xen/gntdev: constify mmu_notifier_ops structures
Message-ID<qAiu6-3rA-15@gated-at.bofh.it>
In reply to#1279465
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/

[toc] | [prev] | [next] | [standalone]


#1279924 — Re: [Xen-devel] [PATCH 1/3] xen/gntdev: constify mmu_notifier_ops structures

FromDavid Vrabel <david.vrabel@citrix.com>
Date2015-11-30 15:20 +0100
SubjectRe: [Xen-devel] [PATCH 1/3] xen/gntdev: constify mmu_notifier_ops structures
Message-ID<qAxt9-4HX-51@gated-at.bofh.it>
In reply to#1279467
On 29/11/15 22:02, Julia Lawall wrote:
> 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.

Applied to for-linus-4.5, thanks.

David
--
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/

[toc] | [prev] | [next] | [standalone]


#1279468 — [PATCH 3/3] IB/core: constify mmu_notifier_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2015-11-29 23:20 +0100
Subject[PATCH 3/3] IB/core: constify mmu_notifier_ops structures
Message-ID<qAiu6-3rA-11@gated-at.bofh.it>
In reply to#1279465
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/infiniband/core/umem_odp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/umem_odp.c b/drivers/infiniband/core/umem_odp.c
index 40becdb..e69bf26 100644
--- a/drivers/infiniband/core/umem_odp.c
+++ b/drivers/infiniband/core/umem_odp.c
@@ -232,7 +232,7 @@ static void ib_umem_notifier_invalidate_range_end(struct mmu_notifier *mn,
 	ib_ucontext_notifier_end_account(context);
 }
 
-static struct mmu_notifier_ops ib_umem_notifiers = {
+static const struct mmu_notifier_ops ib_umem_notifiers = {
 	.release                    = ib_umem_notifier_release,
 	.invalidate_page            = ib_umem_notifier_invalidate_page,
 	.invalidate_range_start     = ib_umem_notifier_invalidate_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/

[toc] | [prev] | [next] | [standalone]


#1279469 — [PATCH 2/3] iommu/amd: constify mmu_notifier_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2015-11-29 23:20 +0100
Subject[PATCH 2/3] iommu/amd: constify mmu_notifier_ops structures
Message-ID<qAiu6-3rA-17@gated-at.bofh.it>
In reply to#1279465
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/iommu/amd_iommu_v2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/amd_iommu_v2.c b/drivers/iommu/amd_iommu_v2.c
index d21d4ed..c847f2f 100644
--- a/drivers/iommu/amd_iommu_v2.c
+++ b/drivers/iommu/amd_iommu_v2.c
@@ -432,7 +432,7 @@ static void mn_release(struct mmu_notifier *mn, struct mm_struct *mm)
 	unbind_pasid(pasid_state);
 }
 
-static struct mmu_notifier_ops iommu_mn = {
+static const struct mmu_notifier_ops iommu_mn = {
 	.release		= mn_release,
 	.clear_flush_young      = mn_clear_flush_young,
 	.invalidate_page        = mn_invalidate_page,

--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web