staging: rdma: hfi1: diag: constify hfi1_filter_array structure
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 23 Dec 2015 20:42:57 +0000 (21:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 02:47:17 +0000 (18:47 -0800)
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>
Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/hfi1/diag.c

index 0c88317..e41159f 100644 (file)
@@ -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 },