Skip to contentSkip to conversation

namespace.c - compiler warning

PATCH In review [email protected] 3 participants 3 messages Jun 13, 2002 – Jul 1, 2002 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 namespace.c - compiler warning

init_rootfs() (from ramfs) doesn't appear in any header file. I didn't see any that looked like a good home, so lets put a prototype at the top of fs/namespace.c. This only use of this function is in namespace.c.

Patch is agains 2.4.19-pre10.

Rob.

fs/namespace.c Wed Jun 12 23:48:02 2002 renamed from fs/namespace.c Fri Jun 7 23:42:07 2002 +2 -0
@@ -29,6 +29,8 @@
 static int hash_mask, hash_bits;
 static kmem_cache_t *mnt_cache; 
 
+extern void init_rootfs(void);
+
 static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry)
 {
        unsigned long tmp = ((unsigned long) mnt / L1_CACHE_BYTES);
#1 lore raw

In message <20020613035339.GA3950@cartman> you write:

Quoted 5 lines

init_rootfs() (from ramfs) doesn't appear in any header file. I didn't see any that looked like a good home, so lets put a prototype at the top of fs/namespace.c. This only use of this function is in namespace.c.

Patch is agains 2.4.19-pre10.

Please simply backport the declaration from 2.5: it gets the function type correct.

Thanks,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

#2 lore raw
Quoted 9 lines · Rusty Russell

In message <20020613035339.GA3950@cartman> you write:

Quoted 5 lines

init_rootfs() (from ramfs) doesn't appear in any header file. I didn't see any that looked like a good home, so lets put a prototype at the top of fs/namespace.c. This only use of this function is in namespace.c.

Patch is agains 2.4.19-pre10.

Please simply backport the declaration from 2.5: it gets the function type correct.

So that becomes:

fs/namespace.c +1 -0
@@ -24,6 +24,7 @@
 struct vfsmount *do_kern_mount(const char *type, int flags, char *name, void *data);
 int do_remount_sb(struct super_block *sb, int flags, void * data);
 void kill_super(struct super_block *sb);
+extern int __init init_rootfs(void);
 
 static struct list_head *mount_hashtable;
 static int hash_mask, hash_bits;

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds