]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
i40iw: constify i40iw_vf_cqp_ops structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 1 May 2016 12:22:21 +0000 (14:22 +0200)
committerDoug Ledford <dledford@redhat.com>
Fri, 13 May 2016 23:39:33 +0000 (19:39 -0400)
The i40iw_vf_cqp_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>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/i40iw/i40iw_type.h
drivers/infiniband/hw/i40iw/i40iw_vf.c
drivers/infiniband/hw/i40iw/i40iw_vf.h

index 937b7ee7d69b1f021a27290cada950d528311fc6..16cc61720b530e5879ba509ab8ad43e714fc738c 100644 (file)
@@ -479,7 +479,7 @@ struct i40iw_sc_dev {
        struct i40iw_virt_mem ieq_mem;
        struct i40iw_puda_rsrc *ieq;
 
-       struct i40iw_vf_cqp_ops *iw_vf_cqp_ops;
+       const struct i40iw_vf_cqp_ops *iw_vf_cqp_ops;
 
        struct i40iw_hmc_fpm_misc hmc_fpm_misc;
        u16 qs_handle;
index cb0f18340e144bb7b4e426152f91ef2bda3d817f..e33d4810965c853a3e132114ebbefaafaaf62f0c 100644 (file)
@@ -80,6 +80,6 @@ enum i40iw_status_code i40iw_manage_vf_pble_bp(struct i40iw_sc_cqp *cqp,
        return 0;
 }
 
-struct i40iw_vf_cqp_ops iw_vf_cqp_ops = {
+const struct i40iw_vf_cqp_ops iw_vf_cqp_ops = {
        i40iw_manage_vf_pble_bp
 };
index f649f3a62e13adde83a622c094b4718318bc8a89..4359559ece9c1edebef59ebbac1884246176d51a 100644 (file)
@@ -57,6 +57,6 @@ enum i40iw_status_code i40iw_manage_vf_pble_bp(struct i40iw_sc_cqp *cqp,
                                               u64 scratch,
                                               bool post_sq);
 
-extern struct i40iw_vf_cqp_ops iw_vf_cqp_ops;
+extern const struct i40iw_vf_cqp_ops iw_vf_cqp_ops;
 
 #endif