From: Julia Lawall Date: Wed, 23 Dec 2015 20:42:57 +0000 (+0100) Subject: staging: rdma: hfi1: diag: constify hfi1_filter_array structure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=480fd015ec5c9109c55e39057f3df60278851432;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Acked-by: Mike Marciniszyn Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rdma/hfi1/diag.c b/drivers/staging/rdma/hfi1/diag.c index 0c8831705664..e41159fe6889 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 },