Skip to contentSkip to conversation

fsnotify: make dnotify_fsnotify_ops const

PATCH In review Bhumika Goyal 2 participants 2 messages Aug 30, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsnotify: make dnotify_fsnotify_ops const

Make this const as it is never modified.

---
 fs/notify/dnotify/dnotify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/notify/dnotify/dnotify.c +1 -1
index 2430a04..cba3283 100644
@@ -133,7 +133,7 @@ static void dnotify_free_mark(struct fsnotify_mark *fsn_mark)
 	kmem_cache_free(dnotify_mark_cache, dn_mark);
 }
 
-static struct fsnotify_ops dnotify_fsnotify_ops = {
+static const struct fsnotify_ops dnotify_fsnotify_ops = {
 	.handle_event = dnotify_handle_event,
 	.free_mark = dnotify_free_mark,
 };
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 3 lines · Bhumika Goyal

Make this const as it is never modified.

Thanks. Added to my tree.

Honza

Quoted 20 lines
---
 fs/notify/dnotify/dnotify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/notify/dnotify/dnotify.c +1 -1
index 2430a04..cba3283 100644
@@ -133,7 +133,7 @@ static void dnotify_free_mark(struct fsnotify_mark *fsn_mark)
 	kmem_cache_free(dnotify_mark_cache, dn_mark);
 }
 
-static struct fsnotify_ops dnotify_fsnotify_ops = {
+static const struct fsnotify_ops dnotify_fsnotify_ops = {
 	.handle_event = dnotify_handle_event,
 	.free_mark = dnotify_free_mark,
 };
Signature · 1 line
1.9.1
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR