Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1391804 > unrolled thread
| Started by | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| First post | 2016-05-01 14:40 +0200 |
| Last post | 2016-05-02 07:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] i40iw: constify i40iw_vf_cqp_ops structure Julia Lawall <Julia.Lawall@lip6.fr> - 2016-05-01 14:40 +0200
Re: [PATCH] i40iw: constify i40iw_vf_cqp_ops structure Leon Romanovsky <leon@kernel.org> - 2016-05-02 07:30 +0200
| From | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| Date | 2016-05-01 14:40 +0200 |
| Subject | [PATCH] i40iw: constify i40iw_vf_cqp_ops structure |
| Message-ID | <rtYPf-18i-5@gated-at.bofh.it> |
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>
---
drivers/infiniband/hw/i40iw/i40iw_type.h | 2 +-
drivers/infiniband/hw/i40iw/i40iw_vf.c | 2 +-
drivers/infiniband/hw/i40iw/i40iw_vf.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/i40iw/i40iw_type.h b/drivers/infiniband/hw/i40iw/i40iw_type.h
index edb3a8c..7f935ec 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_type.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_type.h
@@ -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;
diff --git a/drivers/infiniband/hw/i40iw/i40iw_vf.c b/drivers/infiniband/hw/i40iw/i40iw_vf.c
index cb0f183..e33d481 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_vf.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_vf.c
@@ -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
};
diff --git a/drivers/infiniband/hw/i40iw/i40iw_vf.h b/drivers/infiniband/hw/i40iw/i40iw_vf.h
index f649f3a..4359559 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_vf.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_vf.h
@@ -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
[toc] | [next] | [standalone]
| From | Leon Romanovsky <leon@kernel.org> |
|---|---|
| Date | 2016-05-02 07:30 +0200 |
| Message-ID | <rueAF-63I-1@gated-at.bofh.it> |
| In reply to | #1391804 |
[Multipart message — attachments visible in raw view] — view raw
On Sun, May 01, 2016 at 02:22:21PM +0200, Julia Lawall wrote: > 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> > Thanks Julia, Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web