Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1314093
| From | David Vrabel <david.vrabel@citrix.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Xen-devel] [PATCH] cleancache: constify cleancache_ops structure |
| Date | 2016-01-21 11:50 +0100 |
| Message-ID | <qTkYq-41z-31@gated-at.bofh.it> (permalink) |
| References | <qIYZc-6j8-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 <Julia.Lawall@lip6.fr> > > --- > > 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... > --- 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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [Xen-devel] [PATCH] cleancache: constify cleancache_ops structure David Vrabel <david.vrabel@citrix.com> - 2016-01-21 11:50 +0100
Re: [Xen-devel] [PATCH] cleancache: constify cleancache_ops structure Julia Lawall <julia.lawall@lip6.fr> - 2016-01-21 12:10 +0100
[Xen-devel] [PATCH v2] cleancache: constify cleancache_ops structure Julia Lawall <julia.lawall@lip6.fr> - 2016-01-21 16:50 +0100
Re: [Xen-devel] [PATCH v2] cleancache: constify cleancache_ops structure Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2016-01-21 22:40 +0100
csiph-web