* [PATCH] staging: rdma: hfi1: diag: constify hfi1_filter_array structure
@ 2015-12-23 20:42 ` Julia Lawall
0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2015-12-23 20:42 UTC (permalink / raw
To: Mike Marciniszyn
Cc: kernel-janitors, Doug Ledford, Sean Hefty, Hal Rosenstock,
Greg Kroah-Hartman, linux-rdma, devel, linux-kernel
The hfi1_filter_array 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/staging/rdma/hfi1/diag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rdma/hfi1/diag.c b/drivers/staging/rdma/hfi1/diag.c
index 0c88317..e41159f 100644
--- a/drivers/staging/rdma/hfi1/diag.c
+++ b/drivers/staging/rdma/hfi1/diag.c
@@ -257,7 +257,7 @@ static int hfi1_filter_ib_service_level(void *ibhdr, void *packet_data,
static int hfi1_filter_ib_pkey(void *ibhdr, void *packet_data, void *value);
static int hfi1_filter_direction(void *ibhdr, void *packet_data, void *value);
-static struct hfi1_filter_array hfi1_filters[] = {
+static const struct hfi1_filter_array hfi1_filters[] = {
{ hfi1_filter_lid },
{ hfi1_filter_dlid },
{ hfi1_filter_mad_mgmt_class },
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] staging: rdma: hfi1: diag: constify hfi1_filter_array structure
@ 2015-12-23 20:42 ` Julia Lawall
0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2015-12-23 20:42 UTC (permalink / raw
To: Mike Marciniszyn
Cc: devel, linux-rdma, Greg Kroah-Hartman, kernel-janitors,
linux-kernel, Doug Ledford, Sean Hefty, Hal Rosenstock
The hfi1_filter_array 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/staging/rdma/hfi1/diag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rdma/hfi1/diag.c b/drivers/staging/rdma/hfi1/diag.c
index 0c88317..e41159f 100644
--- a/drivers/staging/rdma/hfi1/diag.c
+++ b/drivers/staging/rdma/hfi1/diag.c
@@ -257,7 +257,7 @@ static int hfi1_filter_ib_service_level(void *ibhdr, void *packet_data,
static int hfi1_filter_ib_pkey(void *ibhdr, void *packet_data, void *value);
static int hfi1_filter_direction(void *ibhdr, void *packet_data, void *value);
-static struct hfi1_filter_array hfi1_filters[] = {
+static const struct hfi1_filter_array hfi1_filters[] = {
{ hfi1_filter_lid },
{ hfi1_filter_dlid },
{ hfi1_filter_mad_mgmt_class },
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] staging: rdma: hfi1: diag: constify hfi1_filter_array structure
@ 2015-12-23 20:42 ` Julia Lawall
0 siblings, 0 replies; 5+ messages in thread
From: Julia Lawall @ 2015-12-23 20:42 UTC (permalink / raw
To: Mike Marciniszyn
Cc: devel, linux-rdma, Greg Kroah-Hartman, kernel-janitors,
linux-kernel, Doug Ledford, Sean Hefty, Hal Rosenstock
The hfi1_filter_array 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/staging/rdma/hfi1/diag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rdma/hfi1/diag.c b/drivers/staging/rdma/hfi1/diag.c
index 0c88317..e41159f 100644
--- a/drivers/staging/rdma/hfi1/diag.c
+++ b/drivers/staging/rdma/hfi1/diag.c
@@ -257,7 +257,7 @@ static int hfi1_filter_ib_service_level(void *ibhdr, void *packet_data,
static int hfi1_filter_ib_pkey(void *ibhdr, void *packet_data, void *value);
static int hfi1_filter_direction(void *ibhdr, void *packet_data, void *value);
-static struct hfi1_filter_array hfi1_filters[] = {
+static const struct hfi1_filter_array hfi1_filters[] = {
{ hfi1_filter_lid },
{ hfi1_filter_dlid },
{ hfi1_filter_mad_mgmt_class },
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH] staging: rdma: hfi1: diag: constify hfi1_filter_array structure
2015-12-23 20:42 ` Julia Lawall
@ 2016-01-04 15:48 ` Marciniszyn, Mike
-1 siblings, 0 replies; 5+ messages in thread
From: Marciniszyn, Mike @ 2016-01-04 15:48 UTC (permalink / raw
To: Julia Lawall
Cc: devel@driverdev.osuosl.org, linux-rdma@vger.kernel.org,
Greg Kroah-Hartman, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org, Doug Ledford, Hefty, Sean,
Hal Rosenstock
> From: devel [mailto:driverdev-devel-bounces@linuxdriverproject.org] On
> Behalf Of Julia Lawall
> Subject: [PATCH] staging: rdma: hfi1: diag: constify hfi1_filter_array
> structure
>
> The hfi1_filter_array 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 for the patch!
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] staging: rdma: hfi1: diag: constify hfi1_filter_array structure
@ 2016-01-04 15:48 ` Marciniszyn, Mike
0 siblings, 0 replies; 5+ messages in thread
From: Marciniszyn, Mike @ 2016-01-04 15:48 UTC (permalink / raw
To: Julia Lawall
Cc: devel@driverdev.osuosl.org, linux-rdma@vger.kernel.org,
Greg Kroah-Hartman, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org, Doug Ledford, Hefty, Sean,
Hal Rosenstock
> From: devel [mailto:driverdev-devel-bounces@linuxdriverproject.org] On
> Behalf Of Julia Lawall
> Subject: [PATCH] staging: rdma: hfi1: diag: constify hfi1_filter_array
> structure
>
> The hfi1_filter_array 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 for the patch!
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-04 15:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23 20:42 [PATCH] staging: rdma: hfi1: diag: constify hfi1_filter_array structure Julia Lawall
2015-12-23 20:42 ` Julia Lawall
2015-12-23 20:42 ` Julia Lawall
2016-01-04 15:48 ` Marciniszyn, Mike
2016-01-04 15:48 ` Marciniszyn, Mike
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.