All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i40iw: constify i40iw_vf_cqp_ops structure
@ 2016-05-01 12:22 ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2016-05-01 12:22 UTC (permalink / raw)
  To: Faisal Latif
  Cc: kernel-janitors, Chien Tin Tung, Mustafa Ismail, Shiraz Saleem,
	Tatyana Nikolova, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma, linux-kernel

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] i40iw: constify i40iw_vf_cqp_ops structure
@ 2016-05-01 12:22 ` Julia Lawall
  0 siblings, 0 replies; 8+ messages in thread
From: Julia Lawall @ 2016-05-01 12:22 UTC (permalink / raw)
  To: Faisal Latif
  Cc: kernel-janitors, Chien Tin Tung, Mustafa Ismail, Shiraz Saleem,
	Tatyana Nikolova, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma, linux-kernel

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] i40iw: constify i40iw_vf_cqp_ops structure
  2016-05-01 12:22 ` Julia Lawall
  (?)
@ 2016-05-02  5:19     ` Leon Romanovsky
  -1 siblings, 0 replies; 8+ messages in thread
From: Leon Romanovsky @ 2016-05-02  5:19 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Faisal Latif, kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	Chien Tin Tung, Mustafa Ismail, Shiraz Saleem, Tatyana Nikolova,
	Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

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-L2FTfq7BK8M@public.gmane.org>
> 

Thanks Julia,

Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] i40iw: constify i40iw_vf_cqp_ops structure
@ 2016-05-02  5:19     ` Leon Romanovsky
  0 siblings, 0 replies; 8+ messages in thread
From: Leon Romanovsky @ 2016-05-02  5:19 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Faisal Latif, kernel-janitors, Chien Tin Tung, Mustafa Ismail,
	Shiraz Saleem, Tatyana Nikolova, Doug Ledford, Sean Hefty,
	Hal Rosenstock, linux-rdma, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

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>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] i40iw: constify i40iw_vf_cqp_ops structure
@ 2016-05-02  5:19     ` Leon Romanovsky
  0 siblings, 0 replies; 8+ messages in thread
From: Leon Romanovsky @ 2016-05-02  5:19 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Faisal Latif, kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
	Chien Tin Tung, Mustafa Ismail, Shiraz Saleem, Tatyana Nikolova,
	Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 314 bytes --]

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>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] i40iw: constify i40iw_vf_cqp_ops structure
  2016-05-01 12:22 ` Julia Lawall
  (?)
@ 2016-05-13 16:49     ` Doug Ledford
  -1 siblings, 0 replies; 8+ messages in thread
From: Doug Ledford @ 2016-05-13 16:49 UTC (permalink / raw)
  To: Julia Lawall, Faisal Latif
  Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Chien Tin Tung,
	Mustafa Ismail, Shiraz Saleem, Tatyana Nikolova, Sean Hefty,
	Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 375 bytes --]

On 05/01/2016 08:22 AM, 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-L2FTfq7BK8M@public.gmane.org>

Thanks, applied.


-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] i40iw: constify i40iw_vf_cqp_ops structure
@ 2016-05-13 16:49     ` Doug Ledford
  0 siblings, 0 replies; 8+ messages in thread
From: Doug Ledford @ 2016-05-13 16:49 UTC (permalink / raw)
  To: Julia Lawall, Faisal Latif
  Cc: kernel-janitors, Chien Tin Tung, Mustafa Ismail, Shiraz Saleem,
	Tatyana Nikolova, Sean Hefty, Hal Rosenstock, linux-rdma,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

On 05/01/2016 08:22 AM, 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, applied.


-- 
Doug Ledford <dledford@redhat.com>
              GPG KeyID: 0E572FDD



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] i40iw: constify i40iw_vf_cqp_ops structure
@ 2016-05-13 16:49     ` Doug Ledford
  0 siblings, 0 replies; 8+ messages in thread
From: Doug Ledford @ 2016-05-13 16:49 UTC (permalink / raw)
  To: Julia Lawall, Faisal Latif
  Cc: kernel-janitors-u79uwXL29TY76Z2rM5mHXA, Chien Tin Tung,
	Mustafa Ismail, Shiraz Saleem, Tatyana Nikolova, Sean Hefty,
	Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

On 05/01/2016 08:22 AM, 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, applied.


-- 
Doug Ledford <dledford@redhat.com>
              GPG KeyID: 0E572FDD



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-05-13 16:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-01 12:22 [PATCH] i40iw: constify i40iw_vf_cqp_ops structure Julia Lawall
2016-05-01 12:22 ` Julia Lawall
     [not found] ` <1462105341-6299-1-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
2016-05-02  5:19   ` Leon Romanovsky
2016-05-02  5:19     ` Leon Romanovsky
2016-05-02  5:19     ` Leon Romanovsky
2016-05-13 16:49   ` Doug Ledford
2016-05-13 16:49     ` Doug Ledford
2016-05-13 16:49     ` Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.