From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935102AbcAULGx (ORCPT ); Thu, 21 Jan 2016 06:06:53 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:33685 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759234AbcAULGu (ORCPT ); Thu, 21 Jan 2016 06:06:50 -0500 X-IronPort-AV: E=Sophos;i="5.22,325,1449529200"; d="scan'208";a="198512247" Date: Thu, 21 Jan 2016 12:06:26 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: David Vrabel cc: linux-mm@kvack.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Boris Ostrovsky Subject: Re: [Xen-devel] [PATCH] cleancache: constify cleancache_ops structure In-Reply-To: <56A0B6E7.9040201@citrix.com> Message-ID: References: <1450904784-17139-1-git-send-email-Julia.Lawall@lip6.fr> <56A0B6E7.9040201@citrix.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Jan 2016, David Vrabel wrote: > On 23/12/15 21:06, Julia Lawall wrote: > > The cleancache_ops structure is never modified, so declare it as const. > > > > This also removes the __read_mostly declaration on the cleancache_ops > > variable declaration, since it seems redundant with const. > > > > Done with the help of Coccinelle. > > > > Signed-off-by: Julia Lawall > > > > --- > > > > Not sure that the __read_mostly change is correct. Does it apply to the > > variable, or to what the variable points to? > > The variable, so... Thanks. I'll update the patch, unless you have already fixed it. julia > > --- a/mm/cleancache.c > > +++ b/mm/cleancache.c > > @@ -22,7 +22,7 @@ > > * cleancache_ops is set by cleancache_register_ops to contain the pointers > > * to the cleancache "backend" implementation functions. > > */ > > -static struct cleancache_ops *cleancache_ops __read_mostly; > > +static const struct cleancache_ops *cleancache_ops; > > ...you want to retain the __read_mostly here. > > David > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >