Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1471453 > unrolled thread
| Started by | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| First post | 2016-08-28 23:00 +0200 |
| Last post | 2016-08-29 13:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] nfsd: constify reply_cache_stats_operations structure Julia Lawall <Julia.Lawall@lip6.fr> - 2016-08-28 23:00 +0200
Re: [PATCH] nfsd: constify reply_cache_stats_operations structure Jeff Layton <jlayton@poochiereds.net> - 2016-08-29 13:00 +0200
| From | Julia Lawall <Julia.Lawall@lip6.fr> |
|---|---|
| Date | 2016-08-28 23:00 +0200 |
| Subject | [PATCH] nfsd: constify reply_cache_stats_operations structure |
| Message-ID | <sbfln-6yx-1@gated-at.bofh.it> |
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,
[toc] | [next] | [standalone]
| From | Jeff Layton <jlayton@poochiereds.net> |
|---|---|
| Date | 2016-08-29 13:00 +0200 |
| Message-ID | <sbssh-6gC-7@gated-at.bofh.it> |
| In reply to | #1471453 |
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>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web