From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: ericvh@gmail.com, rminnich@sandia.gov, lucho@ionkov.net
Cc: v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [PATCH] fs: 9p: v9fs: constify attribute_group structures.
Date: Fri, 30 Jun 2017 13:31:10 +0530 [thread overview]
Message-ID: <56c6a14b4d05be95e53546d24ef5d2fa56c5e625.1498809585.git.arvind.yadav.cs@gmail.com> (raw)
attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.
File size before:
text data bss dec hex filename
2739 80 28 2847 b1f fs/9p/v9fs.o
File size After adding 'const':
text data bss dec hex filename
2803 32 28 2863 b2f fs/9p/v9fs.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
fs/9p/v9fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index c202930..d10e6da 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -515,7 +515,7 @@ static ssize_t caches_show(struct kobject *kobj,
NULL,
};
-static struct attribute_group v9fs_attr_group = {
+static const struct attribute_group v9fs_attr_group = {
.attrs = v9fs_attrs,
};
--
1.9.1
reply other threads:[~2017-06-30 8:01 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=56c6a14b4d05be95e53546d24ef5d2fa56c5e625.1498809585.git.arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=rminnich@sandia.gov \
--cc=v9fs-developer@lists.sourceforge.net \
/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
all inboxes | Powered by JetHome®