lkml.org 
[lkml]   [2015]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] xfs: constify sysfs_ops structures
Date
These sysfs_ops structures are never modified.  All other sysfs_ops
structures in the kernel are declared as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
fs/xfs/xfs_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_sysfs.c b/fs/xfs/xfs_sysfs.c
index aa03670..192c865 100644
--- a/fs/xfs/xfs_sysfs.c
+++ b/fs/xfs/xfs_sysfs.c
@@ -112,7 +112,7 @@ xfs_dbg_store(
return xfs_attr->store ? xfs_attr->store(buf, count, NULL) : 0;
}

-static struct sysfs_ops xfs_dbg_ops = {
+static const struct sysfs_ops xfs_dbg_ops = {
.show = xfs_dbg_show,
.store = xfs_dbg_store,
};
@@ -227,7 +227,7 @@ xfs_log_store(
return xfs_attr->store ? xfs_attr->store(buf, count, log) : 0;
}

-static struct sysfs_ops xfs_log_ops = {
+static const struct sysfs_ops xfs_log_ops = {
.show = xfs_log_show,
.store = xfs_log_store,
};


\
 
 \ /
  Last update: 2015-10-11 13:01    [W:0.031 / U:1.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site