From patchwork Wed Dec 23 20:42:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 7914331 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B069D9F350 for ; Wed, 23 Dec 2015 20:56:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB7E720429 for ; Wed, 23 Dec 2015 20:56:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 08A66203E3 for ; Wed, 23 Dec 2015 20:56:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965456AbbLWUza (ORCPT ); Wed, 23 Dec 2015 15:55:30 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:48567 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933410AbbLWUz3 (ORCPT ); Wed, 23 Dec 2015 15:55:29 -0500 X-IronPort-AV: E=Sophos;i="5.20,470,1444687200"; d="scan'208";a="193849547" Received: from palace.rsr.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 23 Dec 2015 21:55:28 +0100 From: Julia Lawall To: Mike Marciniszyn Cc: kernel-janitors@vger.kernel.org, Doug Ledford , Sean Hefty , Hal Rosenstock , Greg Kroah-Hartman , linux-rdma@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH] staging: rdma: hfi1: diag: constify hfi1_filter_array structure Date: Wed, 23 Dec 2015 21:42:57 +0100 Message-Id: <1450903377-27803-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/staging/rdma/hfi1/diag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 },