public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs/notify/notification.c: make subsys_initcall function static
@ 2012-03-21 18:45 H Hartley Sweeten
  2012-03-22 22:00 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2012-03-21 18:45 UTC (permalink / raw)
  To: Linux Kernel; +Cc: akpm, eric.dumazet, vapier, asharma

subsys_initcall functions should be marked static.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Arun Sharma <asharma@fb.com>

---

diff --git a/fs/notify/notification.c b/fs/notify/notification.c
index ee18815..c887b13 100644
--- a/fs/notify/notification.c
+++ b/fs/notify/notification.c
@@ -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);
-


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs/notify/notification.c: make subsys_initcall function static
  2012-03-21 18:45 [PATCH] fs/notify/notification.c: make subsys_initcall function static H Hartley Sweeten
@ 2012-03-22 22:00 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2012-03-22 22:00 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: Linux Kernel, eric.dumazet, vapier, asharma

On Wed, 21 Mar 2012 11:45:17 -0700
H Hartley Sweeten <hartleys@visionengravers.com> wrote:

> 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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-22 22:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-21 18:45 [PATCH] fs/notify/notification.c: make subsys_initcall function static H Hartley Sweeten
2012-03-22 22:00 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox