提交 86fc2136 编写于 作者: J Julia Lawall 提交者: David Vrabel

xen/grant-table: constify gnttab_ops structure

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

Done with the help of Coccinelle.
Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
上级 2dd887e3
...@@ -128,7 +128,7 @@ struct unmap_refs_callback_data { ...@@ -128,7 +128,7 @@ struct unmap_refs_callback_data {
int result; int result;
}; };
static struct gnttab_ops *gnttab_interface; static const struct gnttab_ops *gnttab_interface;
static int grant_table_version; static int grant_table_version;
static int grefs_per_grant_frame; static int grefs_per_grant_frame;
...@@ -1013,7 +1013,7 @@ static int gnttab_map(unsigned int start_idx, unsigned int end_idx) ...@@ -1013,7 +1013,7 @@ static int gnttab_map(unsigned int start_idx, unsigned int end_idx)
return rc; return rc;
} }
static struct gnttab_ops gnttab_v1_ops = { static const struct gnttab_ops gnttab_v1_ops = {
.map_frames = gnttab_map_frames_v1, .map_frames = gnttab_map_frames_v1,
.unmap_frames = gnttab_unmap_frames_v1, .unmap_frames = gnttab_unmap_frames_v1,
.update_entry = gnttab_update_entry_v1, .update_entry = gnttab_update_entry_v1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册