kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/grant-table: constify gnttab_ops structure
@ 2015-11-28 14:28 Julia Lawall
  2015-11-30 14:13 ` [Xen-devel] " David Vrabel
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2015-11-28 14:28 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: kernel-janitors, Boris Ostrovsky, David Vrabel, xen-devel, linux-kernel

The gnttab_ops structure is never modified, so declare it as const.

Done with the help of Coccinelle.

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

---
 drivers/xen/grant-table.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index c49f79e..effbaf9 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -128,7 +128,7 @@ struct unmap_refs_callback_data {
 	int result;
 };
 
-static struct gnttab_ops *gnttab_interface;
+static const struct gnttab_ops *gnttab_interface;
 
 static int grant_table_version;
 static int grefs_per_grant_frame;
@@ -1013,7 +1013,7 @@ static int gnttab_map(unsigned int start_idx, unsigned int end_idx)
 	return rc;
 }
 
-static struct gnttab_ops gnttab_v1_ops = {
+static const struct gnttab_ops gnttab_v1_ops = {
 	.map_frames			= gnttab_map_frames_v1,
 	.unmap_frames			= gnttab_unmap_frames_v1,
 	.update_entry			= gnttab_update_entry_v1,


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

* Re: [Xen-devel] [PATCH] xen/grant-table: constify gnttab_ops structure
  2015-11-28 14:28 [PATCH] xen/grant-table: constify gnttab_ops structure Julia Lawall
@ 2015-11-30 14:13 ` David Vrabel
  0 siblings, 0 replies; 2+ 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 28/11/15 14:28, Julia Lawall wrote:
> The gnttab_ops structure is never modified, so declare it as const.
> 
> Done with the help of Coccinelle.

Applied to for-linus-4.5, thanks.

David

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

end of thread, other threads:[~2015-11-30 14:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-28 14:28 [PATCH] xen/grant-table: constify gnttab_ops structure Julia Lawall
2015-11-30 14:13 ` [Xen-devel] " David Vrabel

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