kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] constify mmu_notifier_ops structures
@ 2015-11-29 22:02 Julia Lawall
  2015-11-29 22:02 ` [PATCH 1/3] xen/gntdev: " Julia Lawall
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Julia Lawall @ 2015-11-29 22:02 UTC (permalink / raw)
  To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
  Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

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(-)

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

* [PATCH 1/3] xen/gntdev: constify mmu_notifier_ops structures
  2015-11-29 22:02 [PATCH 0/3] constify mmu_notifier_ops structures Julia Lawall
@ 2015-11-29 22:02 ` Julia Lawall
  2015-11-30 14:13   ` [Xen-devel] " David Vrabel
  2015-11-29 22:02 ` [PATCH 2/3] iommu/amd: " Julia Lawall
  2015-11-29 22:02 ` [PATCH 3/3] IB/core: " Julia Lawall
  2 siblings, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2015-11-29 22:02 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: kernel-janitors, Boris Ostrovsky, David Vrabel, xen-devel, linux-kernel

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,


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

* [PATCH 2/3] iommu/amd: constify mmu_notifier_ops structures
  2015-11-29 22:02 [PATCH 0/3] constify mmu_notifier_ops structures Julia Lawall
  2015-11-29 22:02 ` [PATCH 1/3] xen/gntdev: " Julia Lawall
@ 2015-11-29 22:02 ` Julia Lawall
  2015-12-14 14:45   ` Joerg Roedel
  2015-11-29 22:02 ` [PATCH 3/3] IB/core: " Julia Lawall
  2 siblings, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2015-11-29 22:02 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: kernel-janitors, iommu, linux-kernel

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,


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

* [PATCH 3/3] IB/core: constify mmu_notifier_ops structures
  2015-11-29 22:02 [PATCH 0/3] constify mmu_notifier_ops structures Julia Lawall
  2015-11-29 22:02 ` [PATCH 1/3] xen/gntdev: " Julia Lawall
  2015-11-29 22:02 ` [PATCH 2/3] iommu/amd: " Julia Lawall
@ 2015-11-29 22:02 ` Julia Lawall
       [not found]   ` <1448834571-2988-4-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
  2 siblings, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2015-11-29 22:02 UTC (permalink / raw)
  To: Doug Ledford
  Cc: kernel-janitors, Sean Hefty, Hal Rosenstock, linux-rdma, linux-kernel

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,


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

* Re: [PATCH 3/3] IB/core: constify mmu_notifier_ops structures
       [not found]   ` <1448834571-2988-4-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
@ 2015-11-30  6:07     ` Haggai Eran
  0 siblings, 0 replies; 7+ messages in thread
From: Haggai Eran @ 2015-11-30  6:07 UTC (permalink / raw)
  To: Julia Lawall, Doug Ledford
  Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Sean Hefty,
	Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 30/11/2015 00: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.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Reviewed-by: Haggai Eran <haggaie@mellanox.com>

Thanks,
Haggai


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

* Re: [Xen-devel] [PATCH 1/3] xen/gntdev: constify mmu_notifier_ops structures
  2015-11-29 22:02 ` [PATCH 1/3] xen/gntdev: " Julia Lawall
@ 2015-11-30 14:13   ` David Vrabel
  0 siblings, 0 replies; 7+ messages in thread
From: David Vrabel @ 2015-11-30 14:13 UTC (permalink / raw)
  To: Julia Lawall, Konrad Rzeszutek Wilk
  Cc: xen-devel, Boris Ostrovsky, kernel-janitors, David Vrabel, linux-kernel

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

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

* Re: [PATCH 2/3] iommu/amd: constify mmu_notifier_ops structures
  2015-11-29 22:02 ` [PATCH 2/3] iommu/amd: " Julia Lawall
@ 2015-12-14 14:45   ` Joerg Roedel
  0 siblings, 0 replies; 7+ messages in thread
From: Joerg Roedel @ 2015-12-14 14:45 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, iommu, linux-kernel

On Sun, Nov 29, 2015 at 11:02:50PM +0100, 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.
> 
> 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(-)

Applied, thanks.


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

end of thread, other threads:[~2015-12-14 14:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-29 22:02 [PATCH 0/3] constify mmu_notifier_ops structures Julia Lawall
2015-11-29 22:02 ` [PATCH 1/3] xen/gntdev: " Julia Lawall
2015-11-30 14:13   ` [Xen-devel] " David Vrabel
2015-11-29 22:02 ` [PATCH 2/3] iommu/amd: " Julia Lawall
2015-12-14 14:45   ` Joerg Roedel
2015-11-29 22:02 ` [PATCH 3/3] IB/core: " Julia Lawall
     [not found]   ` <1448834571-2988-4-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
2015-11-30  6:07     ` Haggai Eran

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).