Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751206AbdH0GFi (ORCPT ); Sun, 27 Aug 2017 02:05:38 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:33285 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbdH0GFh (ORCPT ); Sun, 27 Aug 2017 02:05:37 -0400 From: Arvind Yadav To: oleg.drokin@intel.com, andreas.dilger@intel.com, jsimmons@infradead.org, gregkh@linuxfoundation.org, john.hammond@intel.com Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, lustre-devel@lists.lustre.org Subject: [PATCH] staging: lustre: constify cl_lock_operations Date: Sun, 27 Aug 2017 11:35:27 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 890 Lines: 24 cl_lock_operations are not supposed to change at runtime. cl_lock_slice_add is working with const cl_lock_operations. So mark the non-const cl_lock_operations structs as const. Signed-off-by: Arvind Yadav --- drivers/staging/lustre/lustre/obdecho/echo_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c index 1c4a8fe..b3fbc3c 100644 --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c @@ -319,7 +319,7 @@ static void echo_lock_fini(const struct lu_env *env, kmem_cache_free(echo_lock_kmem, ecl); } -static struct cl_lock_operations echo_lock_ops = { +static const struct cl_lock_operations echo_lock_ops = { .clo_fini = echo_lock_fini, }; -- 2.7.4