Skip to contentSkip to conversation

fs/notify/notification.c: make subsys_initcall function static

PATCH In review H Hartley Sweeten 2 participants 2 messages Mar 21, 2012 – Mar 22, 2012 Fsnotify: filesystem notification infrastructure

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/notify/notification.c: make subsys_initcall function static

subsys_initcall functions should be marked static.

Cc Andrew Morton <[email protected]>
Cc Eric Dumazet <[email protected]>
Cc Mike Frysinger <[email protected]>
Cc Arun Sharma <[email protected]>

---

fs/notify/notification.c +1 -2
index ee18815..c887b13 100644
@@ -447,7 +447,7 @@ struct fsnotify_event *fsnotify_create_event(struct inode *to_tell, __u32 mask,
 	return event;
 }
 
-__init int fsnotify_notification_init(void)
+static __init int fsnotify_notification_init(void)
 {
 	fsnotify_event_cachep = KMEM_CACHE(fsnotify_event, SLAB_PANIC);
 	fsnotify_event_holder_cachep = KMEM_CACHE(fsnotify_event_holder, SLAB_PANIC);
@@ -461,4 +461,3 @@ __init int fsnotify_notification_init(void)
 	return 0;
 }
 subsys_initcall(fsnotify_notification_init);
-
#1 lore raw
Quoted 1 line · On Wed, 21 Mar 2012 11:45:17 -0700 H Hartley Sweeten…

subsys_initcall functions should be marked static.

Well, I suppose there are legitimate situations where they could be non-static(?), although those would be rather bizarre.

A better reason for making this static is that it has no references outside this file.