Commit 2392a4cd authored by Julia Lawall's avatar Julia Lawall Committed by Doug Ledford

IB/iser: constify iser_reg_ops structure

The iser_reg_ops structures are never modified, so declare them as const.

Done with the help of Coccinelle.
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Acked-by: default avatarSagi Grimberg <sagig@mellanox.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent c419874c
...@@ -410,7 +410,7 @@ struct iser_device { ...@@ -410,7 +410,7 @@ struct iser_device {
int refcount; int refcount;
int comps_used; int comps_used;
struct iser_comp *comps; struct iser_comp *comps;
struct iser_reg_ops *reg_ops; const struct iser_reg_ops *reg_ops;
}; };
#define ISER_CHECK_GUARD 0xc0 #define ISER_CHECK_GUARD 0xc0
......
...@@ -49,7 +49,7 @@ int iser_fast_reg_mr(struct iscsi_iser_task *iser_task, ...@@ -49,7 +49,7 @@ int iser_fast_reg_mr(struct iscsi_iser_task *iser_task,
struct iser_reg_resources *rsc, struct iser_reg_resources *rsc,
struct iser_mem_reg *mem_reg); struct iser_mem_reg *mem_reg);
static struct iser_reg_ops fastreg_ops = { static const struct iser_reg_ops fastreg_ops = {
.alloc_reg_res = iser_alloc_fastreg_pool, .alloc_reg_res = iser_alloc_fastreg_pool,
.free_reg_res = iser_free_fastreg_pool, .free_reg_res = iser_free_fastreg_pool,
.reg_mem = iser_fast_reg_mr, .reg_mem = iser_fast_reg_mr,
...@@ -58,7 +58,7 @@ static struct iser_reg_ops fastreg_ops = { ...@@ -58,7 +58,7 @@ static struct iser_reg_ops fastreg_ops = {
.reg_desc_put = iser_reg_desc_put_fr, .reg_desc_put = iser_reg_desc_put_fr,
}; };
static struct iser_reg_ops fmr_ops = { static const struct iser_reg_ops fmr_ops = {
.alloc_reg_res = iser_alloc_fmr_pool, .alloc_reg_res = iser_alloc_fmr_pool,
.free_reg_res = iser_free_fmr_pool, .free_reg_res = iser_free_fmr_pool,
.reg_mem = iser_fast_reg_fmr, .reg_mem = iser_fast_reg_fmr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment