mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bhumika Goyal <bhumirks@gmail.com>
To: julia.lawall@lip6.fr, dhowells@redhat.com,
	linux-cachefs@redhat.com, linux-kernel@vger.kernel.org
Cc: Bhumika Goyal <bhumirks@gmail.com>
Subject: [PATCH] FS-Cache: make fscache_fsdef_netfs_def const
Date: Sat, 30 Sep 2017 22:01:44 +0530	[thread overview]
Message-ID: <1506789104-9155-1-git-send-email-bhumirks@gmail.com> (raw)

Make fscache_fsdef_netfs_def const as it is only stored in a const field
of a fscache_cookie structure. Make the declaration const too.

Structure found using Coccinelle and changes done by hand.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 fs/fscache/fsdef.c    | 2 +-
 fs/fscache/internal.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/fscache/fsdef.c b/fs/fscache/fsdef.c
index 5a117df..7c86f37 100644
--- a/fs/fscache/fsdef.c
+++ b/fs/fscache/fsdef.c
@@ -68,7 +68,7 @@ struct fscache_cookie fscache_fsdef_index = {
  * a specific netfs and only applicable to a particular version of the index
  * structure used by that netfs.
  */
-struct fscache_cookie_def fscache_fsdef_netfs_def = {
+const struct fscache_cookie_def fscache_fsdef_netfs_def = {
 	.name		= "FSDEF.netfs",
 	.type		= FSCACHE_COOKIE_TYPE_INDEX,
 	.get_key	= fscache_fsdef_netfs_get_key,
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h
index 97ec451..d485473 100644
--- a/fs/fscache/internal.h
+++ b/fs/fscache/internal.h
@@ -55,7 +55,7 @@ extern struct fscache_cache *fscache_select_cache_for_object(
  * fsdef.c
  */
 extern struct fscache_cookie fscache_fsdef_index;
-extern struct fscache_cookie_def fscache_fsdef_netfs_def;
+extern const struct fscache_cookie_def fscache_fsdef_netfs_def;
 
 /*
  * histogram.c
-- 
1.9.1

                 reply	other threads:[~2017-09-30 16:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506789104-9155-1-git-send-email-bhumirks@gmail.com \
    --to=bhumirks@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-cachefs@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome