* [PATCH v2] ramfs: Remove module leftovers
@ 2011-10-10 10:54 Richard Weinberger
2011-10-10 11:09 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2011-10-10 10:54 UTC (permalink / raw)
To: linux-kernel; +Cc: xiyou.wangcong, viro, dchinner, hch, Richard Weinberger
Since ramfs is hard-selected to "y", the module leftovers make
no sense.
Signed-off-by: Richard Weinberger <richard@nod.at>
---
fs/ramfs/inode.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index eacb166..148fdf6 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -23,7 +23,6 @@
* caches is sufficient.
*/
-#include <linux/module.h>
#include <linux/fs.h>
#include <linux/pagemap.h>
#include <linux/highmem.h>
@@ -288,14 +287,7 @@ static int __init init_ramfs_fs(void)
{
return register_filesystem(&ramfs_fs_type);
}
-
-static void __exit exit_ramfs_fs(void)
-{
- unregister_filesystem(&ramfs_fs_type);
-}
-
-module_init(init_ramfs_fs)
-module_exit(exit_ramfs_fs)
+device_initcall(init_ramfs_fs);
int __init init_rootfs(void)
{
@@ -311,5 +303,3 @@ int __init init_rootfs(void)
return err;
}
-
-MODULE_LICENSE("GPL");
--
1.7.7
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] ramfs: Remove module leftovers
2011-10-10 10:54 [PATCH v2] ramfs: Remove module leftovers Richard Weinberger
@ 2011-10-10 11:09 ` Christoph Hellwig
2011-10-10 11:13 ` Richard Weinberger
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2011-10-10 11:09 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-kernel, xiyou.wangcong, viro, dchinner, hch
On Mon, Oct 10, 2011 at 12:54:39PM +0200, Richard Weinberger wrote:
> Since ramfs is hard-selected to "y", the module leftovers make
> no sense.
Removing the dead code looks good, but what is the point in using
device_initcall? We've always been using module_init for non-modular
code, though.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ramfs: Remove module leftovers
2011-10-10 11:09 ` Christoph Hellwig
@ 2011-10-10 11:13 ` Richard Weinberger
2011-10-10 11:24 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2011-10-10 11:13 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-kernel, xiyou.wangcong, viro, dchinner
[-- Attachment #1: Type: text/plain, Size: 523 bytes --]
Am 10.10.2011 13:09, schrieb Christoph Hellwig:
> On Mon, Oct 10, 2011 at 12:54:39PM +0200, Richard Weinberger wrote:
>> Since ramfs is hard-selected to "y", the module leftovers make
>> no sense.
>
> Removing the dead code looks good, but what is the point in using
> device_initcall? We've always been using module_init for non-modular
> code, though.
>
Ah, ok!
So we can keep the module_init()?
I was not sure whether it's valid to use module_init() in pure
non-modular code...
Thanks,
//richard
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ramfs: Remove module leftovers
2011-10-10 11:13 ` Richard Weinberger
@ 2011-10-10 11:24 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2011-10-10 11:24 UTC (permalink / raw)
To: Richard Weinberger
Cc: Christoph Hellwig, linux-kernel, xiyou.wangcong, viro, dchinner
On Mon, Oct 10, 2011 at 01:13:22PM +0200, Richard Weinberger wrote:
> > Removing the dead code looks good, but what is the point in using
> > device_initcall? We've always been using module_init for non-modular
> > code, though.
> >
>
> Ah, ok!
> So we can keep the module_init()?
> I was not sure whether it's valid to use module_init() in pure
> non-modular code...
It is valid. And if it's not the style de jour anymore thousands of people
will flame me now, but I've always done it that way.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-10-10 11:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-10 10:54 [PATCH v2] ramfs: Remove module leftovers Richard Weinberger
2011-10-10 11:09 ` Christoph Hellwig
2011-10-10 11:13 ` Richard Weinberger
2011-10-10 11:24 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox