From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751917AbdHCR0g (ORCPT ); Thu, 3 Aug 2017 13:26:36 -0400 Received: from casper.infradead.org ([85.118.1.10]:40024 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751131AbdHCR0f (ORCPT ); Thu, 3 Aug 2017 13:26:35 -0400 Date: Thu, 3 Aug 2017 18:26:24 +0100 (BST) From: James Simmons To: Bhumika Goyal cc: julia.lawall@lip6.fr, oleg.drokin@intel.com, andreas.dilger@intel.com, gregkh@linuxfoundation.org, lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: lustre: obd: make echo_lock_ops const In-Reply-To: <1501751568-5662-1-git-send-email-bhumirks@gmail.com> Message-ID: References: <1501751568-5662-1-git-send-email-bhumirks@gmail.com> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170803_182624_308081_D27020EA X-CRM114-Status: GOOD ( 11.85 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Declare echo_lock_ops object of type cl_lock_operations as const as it > is only passed to the function cl_lock_slice_add. The corresponding > argument is of type const, so make the object const. > Acked-by: James Simmons > Signed-off-by: Bhumika Goyal > --- > 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, > }; > > -- > 1.9.1 > >