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


Groups > linux.kernel > #1279148 > unrolled thread

[PATCH] xen/grant-table: constify gnttab_ops structure

Started byJulia Lawall <Julia.Lawall@lip6.fr>
First post2015-11-28 15:50 +0100
Last post2015-11-30 15:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] xen/grant-table: constify gnttab_ops structure Julia Lawall <Julia.Lawall@lip6.fr> - 2015-11-28 15:50 +0100
    Re: [Xen-devel] [PATCH] xen/grant-table: constify gnttab_ops structure David Vrabel <dvrabel@cantab.net> - 2015-11-30 15:20 +0100

#1279148 — [PATCH] xen/grant-table: constify gnttab_ops structure

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2015-11-28 15:50 +0100
Subject[PATCH] xen/grant-table: constify gnttab_ops structure
Message-ID<qzOZ3-1EC-3@gated-at.bofh.it>
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,

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


#1279911 — Re: [Xen-devel] [PATCH] xen/grant-table: constify gnttab_ops structure

FromDavid Vrabel <dvrabel@cantab.net>
Date2015-11-30 15:20 +0100
SubjectRe: [Xen-devel] [PATCH] xen/grant-table: constify gnttab_ops structure
Message-ID<qAxt8-4HX-23@gated-at.bofh.it>
In reply to#1279148
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
--
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