net-next-2.6 phonet causes build error
Subsystems (3)
Hi Remi,
i got this build error from the latest net-next-2.6:
net/phonet/pn_dev.c: In function ‘phonet_init_net’:net/phonet/pn_dev.c:221: error: implicit declaration of function ‘proc_net_fops_create’net/phonet/pn_dev.c: In function ‘phonet_exit_net’:net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’
Regards,
Oliver
David Miller
maintainerFrom: Oliver Hartkopp <[email protected]>
Date: Sun, 26 Jul 2009 20:43:11 +0200
Quoted 9 lines
Hi Remi,
i got this build error from the latest net-next-2.6:
net/phonet/pn_dev.c: In function ‘phonet_init_net’:net/phonet/pn_dev.c:221: error: implicit declaration of function ‘proc_net_fops_create’net/phonet/pn_dev.c: In function ‘phonet_exit_net’:net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’
I just committed the following fix for this:
phonet: Fix build.
As reported by Oliver Hartkopp:
net/phonet/pn_dev.c: In function ‘phonet_init_net’:net/phonet/pn_dev.c:221: error: implicit declaration of function ‘proc_net_fops_create’net/phonet/pn_dev.c: In function ‘phonet_exit_net’:net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’
--- net/phonet/pn_dev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
net/phonet/pn_dev.c +1 -0
@@ -27,6 +27,7 @@#include <linux/net.h> #include <linux/netdevice.h> #include <linux/phonet.h> +#include <linux/proc_fs.h> #include <net/sock.h> #include <net/netns/generic.h> #include <net/phonet/pn_dev.h>
Signature · 1 line
1.6.3.3
Quoted 8 lines · On Sunday 26 July 2009 21:43:11 ext Oliver Hartkopp wrote:
i got this build error from the latest net-next-2.6:
net/phonet/pn_dev.c: In function ‘phonet_init_net’:net/phonet/pn_dev.c:221: error: implicit declaration of function ‘proc_net_fops_create’net/phonet/pn_dev.c: In function ‘phonet_exit_net’:net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’
Oops. This makes me wonder why I did not get that one here on my test builds???
Signature · 2 lines
Rémi Denis-Courmont Nokia Devices R&D, Maemo Software, Helsinki
Quoted 10 lines · Rémi Denis-Courmont
Quoted 8 lines · On Sunday 26 July 2009 21:43:11 ext Oliver Hartkopp wrote:
i got this build error from the latest net-next-2.6:
net/phonet/pn_dev.c: In function ‘phonet_init_net’:net/phonet/pn_dev.c:221: error: implicit declaration of function ‘proc_net_fops_create’net/phonet/pn_dev.c: In function ‘phonet_exit_net’:net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’
Quoted 3 lines
Oops. This makes me wonder why I did not get that one here on my test builds???
I also have this warning :
net/phonet/pn_dev.c: In function `phonet_device_get':net/phonet/pn_dev.c:99: warning: 'dev' might be used uninitialized in this function
What about following patch ?
[PATCH] phonet: phonet_device_get() fix
net/phonet/pn_dev.c: In function `phonet_device_get':net/phonet/pn_dev.c:99: warning: 'dev' might be used uninitialized in this function
---
net/phonet/pn_dev.c +1 -1
@@ -96,7 +96,7 @@ struct net_device *phonet_device_get(struct net *net) {struct phonet_device_list *pndevs =phonet_device_list (net);struct phonet_device *pnd; -struct net_device *dev; +struct net_device *dev =NULL ;spin_lock_bh (&pndevs->lock);list_for_each_entry (pnd, &pndevs->list, list) {
Rémi Denis-Courmont
Acked-byQuoted 11 lines · On Monday 27 July 2009 10:03:06 ext Eric Dumazet wrote:
Quoted 10 lines · Rémi Denis-Courmont
Quoted 8 lines · On Sunday 26 July 2009 21:43:11 ext Oliver Hartkopp wrote:
i got this build error from the latest net-next-2.6:
net/phonet/pn_dev.c: In function ‘phonet_init_net’:net/phonet/pn_dev.c:221: error: implicit declaration of function ‘proc_net_fops_create’net/phonet/pn_dev.c: In function ‘phonet_exit_net’:net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’
Quoted 8 lines
Quoted 2 lines
Oops. This makes me wonder why I did not get that one here on my test builds???
I also have this warning :
net/phonet/pn_dev.c: In function `phonet_device_get':net/phonet/pn_dev.c:99: warning: 'dev' might be used uninitialized in this function
Right. This is indeed a bug - thanks. Either my gcc version is bad at that stuff or I have missing debug options :(
Quoted 9 lines
What about following patch ?
[PATCH] phonet:
phonet_device_get()fix
net/phonet/pn_dev.c: In function `phonet_device_get':net/phonet/pn_dev.c:99: warning: 'dev' might be used uninitialized in this functionSigned-off-by Eric Dumazet <[email protected]>
Quoted 15 lines
---
net/phonet/pn_dev.c +1
-1@@ -96,7 +96,7 @@ struct net_device *phonet_device_get(struct net *net) {struct phonet_device_list *pndevs =phonet_device_list (net);struct phonet_device *pnd; -struct net_device *dev; +struct net_device *dev =NULL ;spin_lock_bh (&pndevs->lock);list_for_each_entry (pnd, &pndevs->list, list) {
Signature · 2 lines
Rémi Denis-Courmont Nokia Devices R&D, Maemo Software, Helsinki
Quoted 13 lines · Rémi Denis-Courmont
Quoted 12 lines · On Monday 27 July 2009 10:03:06 ext Eric Dumazet wrote:
Quoted 11 lines · Rémi Denis-Courmont
Quoted 8 lines · On Sunday 26 July 2009 21:43:11 ext Oliver Hartkopp wrote:
i got this build error from the latest net-next-2.6:
net/phonet/pn_dev.c: In function ‘phonet_init_net’:net/phonet/pn_dev.c:221: error: implicit declaration of function ‘proc_net_fops_create’net/phonet/pn_dev.c: In function ‘phonet_exit_net’:net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’Oops. This makes me wonder why I did not get that one here on my test builds???
Quoted 9 lines
Quoted 5 lines
I also have this warning :
net/phonet/pn_dev.c: In function `phonet_device_get':net/phonet/pn_dev.c:99: warning: 'dev' might be used uninitialized in this functionRight. This is indeed a bug - thanks. Either my gcc version is bad at that stuff or I have missing debug options :(
I currently use gcc-3.4.6, and current net-next-2.6 doesnt compile for me (but linux-2.6 does compile properly so I just know this is already fixed upstream)
UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1
drivers/built-in.o(.text+0x86b17): In function `igdng_compute_m_n':
: undefined reference to __udivdi3' drivers/built-in.o(.init.text+0x3c44): In function con_init':
: undefined reference to `.L1443'
make: *** [.tmp_vmlinux1] Erreur 1
No problem with gcc-4.4.0
David Miller
maintainerFrom: "Rémi Denis-Courmont" <[email protected]>
Date: Mon, 27 Jul 2009 09:27:55 +0300
Quoted 10 lines · On Sunday 26 July 2009 21:43:11 ext Oliver Hartkopp wrote:
Quoted 8 lines
i got this build error from the latest net-next-2.6:
net/phonet/pn_dev.c: In function ‘phonet_init_net’:net/phonet/pn_dev.c:221: error: implicit declaration of function ‘proc_net_fops_create’net/phonet/pn_dev.c: In function ‘phonet_exit_net’:net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’
Quoted 2 lines
Oops. This makes me wonder why I did not get that one here on my test builds???
Because the headers on your platform with your configuration end up including linux/proc_fs.h indirectly.
From: "Rémi Denis-Courmont" <[email protected]>
Date: Mon, 27 Jul 2009 11:06:02 +0300
Quoted 10 lines · On Monday 27 July 2009 10:03:06 ext Eric Dumazet wrote:
Quoted 8 lines
[PATCH] phonet:
phonet_device_get()fix
net/phonet/pn_dev.c: In function `phonet_device_get':net/phonet/pn_dev.c:99: warning: 'dev' might be used uninitialized in this functionSigned-off-by Eric Dumazet <[email protected]>
Applied.
Hi Dave,
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
net/phonet/pn_dev.c: In function ‘phonet_init_net’:net/phonet/pn_dev.c:221: error: implicit declaration of function ‘proc_net_fops_create’net/phonet/pn_dev.c: In function ‘phonet_exit_net’:net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’
Quoted 5 lines
Quoted 2 lines
Oops. This makes me wonder why I did not get that one here on my test builds???
Because the headers on your platform with your configuration end up including
linux/proc_fs.hindirectly.
this and similar automatic includes on x86 are still a problem. I always try to compile test with a PPC based system, but even that architecture has a lot of indirect includes. I would be happy if we could get rid of these for x86 systems, but that seems a little bit wishful thinking.
Regards
Marcel
David Miller
maintainerFrom: Marcel Holtmann <[email protected]>
Date: Mon, 27 Jul 2009 17:18:29 +0200
Quoted 12 lines
Hi Dave,
Quoted 10 lines
Quoted 9 lines
Quoted 6 lines
net/phonet/pn_dev.c: In function ‘phonet_init_net’:net/phonet/pn_dev.c:221: error: implicit declaration of function ‘proc_net_fops_create’net/phonet/pn_dev.c: In function ‘phonet_exit_net’:net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’Oops. This makes me wonder why I did not get that one here on my test builds???
Quoted 7 lines
Quoted 2 lines
Because the headers on your platform with your configuration end up including
linux/proc_fs.hindirectly.this and similar automatic includes on x86 are still a problem. I always try to compile test with a PPC based system, but even that architecture has a lot of indirect includes. I would be happy if we could get rid of these for x86 systems, but that seems a little bit wishful thinking.
I always do an allmodconfig build on sparc64 before pushing anything out to my trees so I'm surprised I didn't hit this one.
Quoted 10 lines · Marcel Holtmann
Hi Dave,
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
net/phonet/pn_dev.c: In function ‘phonet_init_net’:net/phonet/pn_dev.c:221: error: implicit declaration of function ‘proc_net_fops_create’net/phonet/pn_dev.c: In function ‘phonet_exit_net’:net/phonet/pn_dev.c:242: error: implicit declaration of function ‘proc_net_remove’Oops. This makes me wonder why I did not get that one here on my test builds???
Quoted 8 lines
Quoted 2 lines
Because the headers on your platform with your configuration end up including
linux/proc_fs.hindirectly.this and similar automatic includes on x86 are still a problem. I always try to compile test with a PPC based system, but even that architecture has a lot of indirect includes. I would be happy if we could get rid of these for x86 systems, but that seems a little bit wishful thinking.
I second this. But in this special case i was using a x86 architecture, that behaved correct.
Maybe one of the script wizards has an idea how to identify and /probably/ fix these automatic includes ...
Regards,
Oliver
David Miller
maintainerFrom: Eric Dumazet <[email protected]>
Date: Mon, 27 Jul 2009 10:09:24 +0200
Quoted 3 lines
I currently use gcc-3.4.6, and current net-next-2.6 doesnt compile for me (but linux-2.6 does compile properly so I just know this is already fixed upstream)
Eric, just FYI, I am not going to merge Linus's tree into net-2.6 (and therefore not into net-next-2.6 either) unless there is some conflict to resolve.
So if you need this build fix, please integrate it locally by whatever means works best for you.
Quoted 7 lines · David Miller
From: Eric Dumazet <[email protected]>
Date: Mon, 27 Jul 2009 10:09:24 +0200Quoted 3 lines
I currently use gcc-3.4.6, and current net-next-2.6 doesnt compile for me (but linux-2.6 does compile properly so I just know this is already fixed upstream)
Quoted 6 lines
Eric, just FYI, I am not going to merge Linus's tree into net-2.6 (and therefore not into net-next-2.6 either) unless there is some conflict to resolve.
So if you need this build fix, please integrate it locally by whatever means works best for you.
Thanks for the info David :)
Dont worry, I can deal with it !