* [PATCH] nfsd: constify reply_cache_stats_operations structure
@ 2016-08-28 20:36 Julia Lawall
2016-08-29 10:57 ` Jeff Layton
0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2016-08-28 20:36 UTC (permalink / raw)
To: J. Bruce Fields; +Cc: kernel-janitors, Jeff Layton, linux-nfs, linux-kernel
reply_cache_stats_operations, of type struct file_operations, is never
modified, so declare it as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
fs/nfsd/nfsctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 65ad016..3bc9693 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -217,7 +217,7 @@ static const struct file_operations pool_stats_operations = {
.release = nfsd_pool_stats_release,
};
-static struct file_operations reply_cache_stats_operations = {
+static const struct file_operations reply_cache_stats_operations = {
.open = nfsd_reply_cache_stats_open,
.read = seq_read,
.llseek = seq_lseek,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nfsd: constify reply_cache_stats_operations structure
2016-08-28 20:36 [PATCH] nfsd: constify reply_cache_stats_operations structure Julia Lawall
@ 2016-08-29 10:57 ` Jeff Layton
2016-11-08 20:36 ` J. Bruce Fields
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2016-08-29 10:57 UTC (permalink / raw)
To: Julia Lawall, J. Bruce Fields; +Cc: kernel-janitors, linux-nfs, linux-kernel
On Sun, 2016-08-28 at 22:36 +0200, Julia Lawall wrote:
> reply_cache_stats_operations, of type struct file_operations, is
> never
> modified, so declare it as const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> fs/nfsd/nfsctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> index 65ad016..3bc9693 100644
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@ -217,7 +217,7 @@ static const struct file_operations
> pool_stats_operations = {
> .release = nfsd_pool_stats_release,
> };
>
> -static struct file_operations reply_cache_stats_operations = {
> +static const struct file_operations reply_cache_stats_operations = {
> .open = nfsd_reply_cache_stats_open,
> .read = seq_read,
> .llseek = seq_lseek,
>
I'm pretty sure Bruce will pick this up for v4.9:
Reviewed-by: Jeff Layton <jlayton@poochiereds.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nfsd: constify reply_cache_stats_operations structure
2016-08-29 10:57 ` Jeff Layton
@ 2016-11-08 20:36 ` J. Bruce Fields
0 siblings, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2016-11-08 20:36 UTC (permalink / raw)
To: Jeff Layton; +Cc: Julia Lawall, kernel-janitors, linux-nfs, linux-kernel
On Mon, Aug 29, 2016 at 06:57:47AM -0400, Jeff Layton wrote:
> On Sun, 2016-08-28 at 22:36 +0200, Julia Lawall wrote:
> > reply_cache_stats_operations, of type struct file_operations, is
> > never
> > modified, so declare it as const.
> >
> > Done with the help of Coccinelle.
> >
> > Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> >
> > ---
> > fs/nfsd/nfsctl.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> > index 65ad016..3bc9693 100644
> > --- a/fs/nfsd/nfsctl.c
> > +++ b/fs/nfsd/nfsctl.c
> > @@ -217,7 +217,7 @@ static const struct file_operations
> > pool_stats_operations = {
> > .release = nfsd_pool_stats_release,
> > };
> >
> > -static struct file_operations reply_cache_stats_operations = {
> > +static const struct file_operations reply_cache_stats_operations = {
> > .open = nfsd_reply_cache_stats_open,
> > .read = seq_read,
> > .llseek = seq_lseek,
> >
>
> I'm pretty sure Bruce will pick this up for v4.9:
Except, for some reason it's been languishing in my inbox. Apologies,
applying....
--b.
>
> Reviewed-by: Jeff Layton <jlayton@poochiereds.net>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-08 20:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-28 20:36 [PATCH] nfsd: constify reply_cache_stats_operations structure Julia Lawall
2016-08-29 10:57 ` Jeff Layton
2016-11-08 20:36 ` J. Bruce Fields
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).