Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751187AbdH1E3y (ORCPT ); Mon, 28 Aug 2017 00:29:54 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34839 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbdH1E3w (ORCPT ); Mon, 28 Aug 2017 00:29:52 -0400 From: Arvind Yadav To: mike.marciniszyn@intel.com, dennis.dalessandro@intel.com, dledford@redhat.com, sean.hefty@intel.com, hal.rosenstock@gmail.com Cc: linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH] IB/hfi1: constify vm_operations_struct Date: Mon, 28 Aug 2017 09:59:28 +0530 Message-Id: <8fa5bd3197b755de927ef5c3ae431e588a3a7d91.1503894254.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 803 Lines: 24 vm_operations_struct are not supposed to change at runtime. vm_area_struct structure working with const vm_operations_struct. So mark the non-const vm_operations_struct structs as const. Signed-off-by: Arvind Yadav --- drivers/infiniband/hw/hfi1/file_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c index 3158128..46db68f 100644 --- a/drivers/infiniband/hw/hfi1/file_ops.c +++ b/drivers/infiniband/hw/hfi1/file_ops.c @@ -116,7 +116,7 @@ static long hfi1_file_ioctl(struct file *fp, unsigned int cmd, .llseek = noop_llseek, }; -static struct vm_operations_struct vm_ops = { +static const struct vm_operations_struct vm_ops = { .fault = vma_fault, }; -- 1.9.1