Skip to contentSkip to conversation

autofs: Only declare function when CONFIG_COMPAT is defined

PATCH In review Frederic Weisbecker 5 participants 9 messages Sep 24, 2010 – Oct 4, 2010 Kernel automounter

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 autofs: Only declare function when CONFIG_COMPAT is defined

From: Márton Németh <[email protected]>

The patch solves the following warnings message when CONFIG_COMPAT is not defined:

fs/autofs/root.c:30: warning: ‘autofs_root_compat_ioctl’ declared ‘static’ but never defined

---
 fs/autofs/root.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/autofs/root.c +2 -0
index 11b1ea7..0c4ca81 100644
@@ -27,7 +27,9 @@ static int autofs_root_unlink(struct inode *,struct dentry *);
 static int autofs_root_rmdir(struct inode *,struct dentry *);
 static int autofs_root_mkdir(struct inode *,struct dentry *,int);
 static long autofs_root_ioctl(struct file *,unsigned int,unsigned long);
+#ifdef CONFIG_COMPAT
 static long autofs_root_compat_ioctl(struct file *,unsigned int,unsigned long);
+#endif
 
 const struct file_operations autofs_root_operations = {
 	.llseek		= generic_file_llseek,
Signature · 1 line
1.6.2.3
#1 lore raw

PATCH 2/2 autofs4: Only declare function when CONFIG_COMPAT is defined

From: Felipe Contreras <[email protected]>

The patch solves the following warnings message when CONFIG_COMPAT is not defined:

fs/autofs4/root.c:31: warning: ‘autofs4_root_compat_ioctl’ declared ‘static’ but never defined

---
 fs/autofs4/root.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/autofs4/root.c +2 -0
index cb1bd38..87f22ae 100644
@@ -28,7 +28,9 @@ static int autofs4_dir_unlink(struct inode *,struct dentry *);
 static int autofs4_dir_rmdir(struct inode *,struct dentry *);
 static int autofs4_dir_mkdir(struct inode *,struct dentry *,int);
 static long autofs4_root_ioctl(struct file *,unsigned int,unsigned long);
+#ifdef CONFIG_COMPAT
 static long autofs4_root_compat_ioctl(struct file *,unsigned int,unsigned long);
+#endif
 static int autofs4_dir_open(struct inode *inode, struct file *file);
 static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *);
 static void *autofs4_follow_link(struct dentry *, struct nameidata *);
Signature · 1 line
1.6.2.3
Acked-by on v1 1/2
#2 lore raw
In reply to Frederic Weisbecker
Quoted 11 lines · On Friday 24 September 2010 15:22:22 Frederic Weisbecker wrote:

From: Márton Németh <[email protected]>

The patch solves the following warnings message when CONFIG_COMPAT is not defined:

fs/autofs/root.c:30: warning: ‘autofs_root_compat_ioctl’ declared ‘static’ but never defined

My initial reaction was to put these into my bkl/vfs tree, but then I noticed that they are against a 2.6.36 bug. Who's taking care of getting them upstream?

- Ian (maintainer)
- Arnd (who wrote the broken patch to start with)
- Frederic (who pushed the broken patch to Linus)
- Andrew (took them into -mm)

I don't care either way, just trying to make sure it gets there and we don't all submit the same patch simultaneously.

The current state is annoying but harmless, so I could also just add the patches to my 2.6.37 queue, which already has autofs patches for the BKL.

Arnd

#3 lore raw
Quoted 23 lines · Arnd Bergmann
Quoted 11 lines · On Friday 24 September 2010 15:22:22 Frederic Weisbecker wrote:

From: Márton Németh <[email protected]>

The patch solves the following warnings message when CONFIG_COMPAT is not defined:

fs/autofs/root.c:30: warning: ‘autofs_root_compat_ioctl’ declared ‘static’ but never defined

My initial reaction was to put these into my bkl/vfs tree, but then I noticed that they are against a 2.6.36 bug. Who's taking care of getting them upstream?

- Ian (maintainer)
- Arnd (who wrote the broken patch to start with)
- Frederic (who pushed the broken patch to Linus)
- Andrew (took them into -mm)

Quoted 7 lines

I don't care either way, just trying to make sure it gets there and we don't all submit the same patch simultaneously.

The current state is annoying but harmless, so I could also just add the patches to my 2.6.37 queue, which already has autofs patches for the BKL.

Arnd

I think Andrew has taken the autofs one, as I've received an mmotm notification. I don't know about the autofs4 one though.

#4 lore raw
In reply to Arnd Bergmann
Quoted 18 lines · On Sat, 25 Sep 2010 17:55:57 +0200 Arnd Bergmann <[email protected]> wrote:
Quoted 11 lines · On Friday 24 September 2010 15:22:22 Frederic Weisbecker wrote:

From: M__rton N__meth <[email protected]>

The patch solves the following warnings message when CONFIG_COMPAT is not defined:

fs/autofs/root.c:30: warning: ___autofs_root_compat_ioctl___ declared ___static___ but never defined

My initial reaction was to put these into my bkl/vfs tree, but then I noticed that they are against a 2.6.36 bug. Who's taking care of getting them upstream?

Quoted 7 lines

- Ian (maintainer)
- Arnd (who wrote the broken patch to start with)
- Frederic (who pushed the broken patch to Linus)
- Andrew (took them into -mm)

I don't care either way, just trying to make sure it gets there and we don't all submit the same patch simultaneously.

The usual deal: if it turns up in linux-next then I drop it. If it doesn't then I'll merge it into 2.6.37.

#5 lore raw
Quoted 8 lines · On Monday 27 September 2010 21:32:52 Andrew Morton wrote:
Quoted 8 lines

My initial reaction was to put these into my bkl/vfs tree, but then I noticed that they are against a 2.6.36 bug. Who's taking care of getting them upstream?

- Ian (maintainer)
- Arnd (who wrote the broken patch to start with)
- Frederic (who pushed the broken patch to Linus)
- Andrew (took them into -mm)

Quoted 5 lines
Quoted 2 lines

I don't care either way, just trying to make sure it gets there and we don't all submit the same patch simultaneously.

The usual deal: if it turns up in linux-next then I drop it. If it doesn't then I'll merge it into 2.6.37.

I ended up putting them into my bkl/vfs tree after all now.

Arnd

#6 lore raw
In reply to Frederic Weisbecker
Quoted 20 lines · Frederic Weisbecker

From: Márton Németh <[email protected]>

The patch solves the following warnings message when CONFIG_COMPAT is not defined:

fs/autofs/root.c:30: warning: ‘autofs_root_compat_ioctl’ declared ‘static’ but never defined

---
 fs/autofs/root.c |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)
fs/autofs/root.c +0 -0
index 11b1ea7..0c4ca81 100644

fs/autofs/root.c static int autofs_root_unlink(struct inode *,struct dentry *); · line 35

Quoted 9 lines
fs/autofs/root.c +2 -0
@@ -27,7 +27,9 @@ static int autofs_root_unlink(struct inode *,struct dentry *);
  static int autofs_root_rmdir(struct inode *,struct dentry *);
  static int autofs_root_mkdir(struct inode *,struct dentry *,int);
  static long autofs_root_ioctl(struct file *,unsigned int,unsigned long);
+#ifdef CONFIG_COMPAT
  static long autofs_root_compat_ioctl(struct file *,unsigned int,unsigned long);
+#endif
 
  const struct file_operations autofs_root_operations = {
        .llseek         = generic_file_llseek,

An alternative (and IMHO better) fix would be to move autofs_root_operations[] and autofs_root_inode_operations[] to the bottom of the file, and get rid of all the forward declarations.

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

#7 lore raw
Quoted 5 lines · Geert Uytterhoeven

An alternative (and IMHO better) fix would be to move autofs_root_operations[] and autofs_root_inode_operations[] to the bottom of the file, and get rid of all the forward declarations.

This is a legacy piece of code (autofs3) which has been long since obsolete anyway... it's one thing to do a minimal patch to keep it alive, another to restructure crap when it's already overdue for removal.

-hpa

#8 lore raw
Quoted 10 lines · H. Peter Anvin
Quoted 5 lines · Geert Uytterhoeven

An alternative (and IMHO better) fix would be to move autofs_root_operations[] and autofs_root_inode_operations[] to the bottom of the file, and get rid of all the forward declarations.

This is a legacy piece of code (autofs3) which has been long since obsolete anyway... it's one thing to do a minimal patch to keep it alive, another to restructure crap when it's already overdue for removal.

You're right. But please note that autofs4 has the exact same issue.

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