netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net-next-2.6 phonet causes build error
@ 2009-07-26 18:43 Oliver Hartkopp
  2009-07-26 20:39 ` David Miller
  2009-07-27  6:27 ` Rémi Denis-Courmont
  0 siblings, 2 replies; 13+ messages in thread
From: Oliver Hartkopp @ 2009-07-26 18:43 UTC (permalink / raw)
  To: Rémi Denis-Courmont; +Cc: Linux Netdev List

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

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

* Re: net-next-2.6 phonet causes build error
  2009-07-26 18:43 net-next-2.6 phonet causes build error Oliver Hartkopp
@ 2009-07-26 20:39 ` David Miller
  2009-07-27  6:27 ` Rémi Denis-Courmont
  1 sibling, 0 replies; 13+ messages in thread
From: David Miller @ 2009-07-26 20:39 UTC (permalink / raw)
  To: oliver; +Cc: remi.denis-courmont, netdev

From: Oliver Hartkopp <oliver@hartkopp.net>
Date: Sun, 26 Jul 2009 20:43:11 +0200

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

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/phonet/pn_dev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index 5107b79..6b30cc1 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -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>
-- 
1.6.3.3


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

* Re: net-next-2.6 phonet causes build error
  2009-07-26 18:43 net-next-2.6 phonet causes build error Oliver Hartkopp
  2009-07-26 20:39 ` David Miller
@ 2009-07-27  6:27 ` Rémi Denis-Courmont
  2009-07-27  7:03   ` Eric Dumazet
  2009-07-27 15:01   ` David Miller
  1 sibling, 2 replies; 13+ messages in thread
From: Rémi Denis-Courmont @ 2009-07-27  6:27 UTC (permalink / raw)
  To: Linux Netdev List

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

-- 
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki


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

* Re: net-next-2.6 phonet causes build error
  2009-07-27  6:27 ` Rémi Denis-Courmont
@ 2009-07-27  7:03   ` Eric Dumazet
  2009-07-27  8:06     ` Rémi Denis-Courmont
  2009-07-27 15:01   ` David Miller
  1 sibling, 1 reply; 13+ messages in thread
From: Eric Dumazet @ 2009-07-27  7:03 UTC (permalink / raw)
  To: Rémi Denis-Courmont; +Cc: Linux Netdev List, David S. Miller

Rémi Denis-Courmont a écrit :
> 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???
> 

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

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---

diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index b0d6ddd..c2b77a6 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -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) {


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

* Re: net-next-2.6 phonet causes build error
  2009-07-27  7:03   ` Eric Dumazet
@ 2009-07-27  8:06     ` Rémi Denis-Courmont
  2009-07-27  8:09       ` Eric Dumazet
  2009-07-27 15:03       ` David Miller
  0 siblings, 2 replies; 13+ messages in thread
From: Rémi Denis-Courmont @ 2009-07-27  8:06 UTC (permalink / raw)
  To: ext Eric Dumazet; +Cc: Linux Netdev List, David S. Miller

On Monday 27 July 2009 10:03:06 ext Eric Dumazet wrote:
> Rémi Denis-Courmont a écrit :
> > 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???
>
> 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 :(

> 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
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

> ---
>
> diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
> index b0d6ddd..c2b77a6 100644
> --- a/net/phonet/pn_dev.c
> +++ b/net/phonet/pn_dev.c
> @@ -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
Nokia Devices R&D, Maemo Software, Helsinki


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

* Re: net-next-2.6 phonet causes build error
  2009-07-27  8:06     ` Rémi Denis-Courmont
@ 2009-07-27  8:09       ` Eric Dumazet
  2009-07-28  2:31         ` David Miller
  2009-07-27 15:03       ` David Miller
  1 sibling, 1 reply; 13+ messages in thread
From: Eric Dumazet @ 2009-07-27  8:09 UTC (permalink / raw)
  To: Rémi Denis-Courmont
  Cc: ext Eric Dumazet, Linux Netdev List, David S. Miller

Rémi Denis-Courmont a écrit :
> On Monday 27 July 2009 10:03:06 ext Eric Dumazet wrote:
>> Rémi Denis-Courmont a écrit :
>>> 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???
>> 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 :(
> 

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 

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

* Re: net-next-2.6 phonet causes build error
  2009-07-27  6:27 ` Rémi Denis-Courmont
  2009-07-27  7:03   ` Eric Dumazet
@ 2009-07-27 15:01   ` David Miller
  2009-07-27 15:18     ` Marcel Holtmann
  1 sibling, 1 reply; 13+ messages in thread
From: David Miller @ 2009-07-27 15:01 UTC (permalink / raw)
  To: remi.denis-courmont; +Cc: netdev

From: "Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>
Date: Mon, 27 Jul 2009 09:27:55 +0300

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

Because the headers on your platform with your configuration end up
including linux/proc_fs.h indirectly.

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

* Re: net-next-2.6 phonet causes build error
  2009-07-27  8:06     ` Rémi Denis-Courmont
  2009-07-27  8:09       ` Eric Dumazet
@ 2009-07-27 15:03       ` David Miller
  1 sibling, 0 replies; 13+ messages in thread
From: David Miller @ 2009-07-27 15:03 UTC (permalink / raw)
  To: remi.denis-courmont; +Cc: eric.dumazet, netdev

From: "Rémi Denis-Courmont" <remi.denis-courmont@nokia.com>
Date: Mon, 27 Jul 2009 11:06:02 +0300

> On Monday 27 July 2009 10:03:06 ext Eric Dumazet wrote:
>>
>> [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
>>
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

Applied.

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

* Re: net-next-2.6 phonet causes build error
  2009-07-27 15:01   ` David Miller
@ 2009-07-27 15:18     ` Marcel Holtmann
  2009-07-27 15:30       ` David Miller
  2009-07-27 15:30       ` Oliver Hartkopp
  0 siblings, 2 replies; 13+ messages in thread
From: Marcel Holtmann @ 2009-07-27 15:18 UTC (permalink / raw)
  To: David Miller; +Cc: remi.denis-courmont, netdev

Hi Dave,

> >> 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???
> 
> Because the headers on your platform with your configuration end up
> including linux/proc_fs.h indirectly.

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



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

* Re: net-next-2.6 phonet causes build error
  2009-07-27 15:18     ` Marcel Holtmann
@ 2009-07-27 15:30       ` David Miller
  2009-07-27 15:30       ` Oliver Hartkopp
  1 sibling, 0 replies; 13+ messages in thread
From: David Miller @ 2009-07-27 15:30 UTC (permalink / raw)
  To: marcel; +Cc: remi.denis-courmont, netdev

From: Marcel Holtmann <marcel@holtmann.org>
Date: Mon, 27 Jul 2009 17:18:29 +0200

> Hi Dave,
> 
>> >> 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???
>> 
>> Because the headers on your platform with your configuration end up
>> including linux/proc_fs.h indirectly.
> 
> 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.

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

* Re: net-next-2.6 phonet causes build error
  2009-07-27 15:18     ` Marcel Holtmann
  2009-07-27 15:30       ` David Miller
@ 2009-07-27 15:30       ` Oliver Hartkopp
  1 sibling, 0 replies; 13+ messages in thread
From: Oliver Hartkopp @ 2009-07-27 15:30 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: David Miller, remi.denis-courmont, netdev

Marcel Holtmann wrote:
> Hi Dave,
> 
>>>> 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???
>> Because the headers on your platform with your configuration end up
>> including linux/proc_fs.h indirectly.
> 
> 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


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

* Re: net-next-2.6 phonet causes build error
  2009-07-27  8:09       ` Eric Dumazet
@ 2009-07-28  2:31         ` David Miller
  2009-07-28  6:18           ` Eric Dumazet
  0 siblings, 1 reply; 13+ messages in thread
From: David Miller @ 2009-07-28  2:31 UTC (permalink / raw)
  To: dada1; +Cc: remi.denis-courmont, eric.dumazet, netdev

From: Eric Dumazet <dada1@cosmosbay.com>
Date: Mon, 27 Jul 2009 10:09:24 +0200

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

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

* Re: net-next-2.6 phonet causes build error
  2009-07-28  2:31         ` David Miller
@ 2009-07-28  6:18           ` Eric Dumazet
  0 siblings, 0 replies; 13+ messages in thread
From: Eric Dumazet @ 2009-07-28  6:18 UTC (permalink / raw)
  To: David Miller; +Cc: remi.denis-courmont, netdev

David Miller a écrit :
> From: Eric Dumazet <dada1@cosmosbay.com>
> Date: Mon, 27 Jul 2009 10:09:24 +0200
> 
>> 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.

Thanks for the info David :)

Dont worry, I can deal with it !

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

end of thread, other threads:[~2009-07-28  6:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-26 18:43 net-next-2.6 phonet causes build error Oliver Hartkopp
2009-07-26 20:39 ` David Miller
2009-07-27  6:27 ` Rémi Denis-Courmont
2009-07-27  7:03   ` Eric Dumazet
2009-07-27  8:06     ` Rémi Denis-Courmont
2009-07-27  8:09       ` Eric Dumazet
2009-07-28  2:31         ` David Miller
2009-07-28  6:18           ` Eric Dumazet
2009-07-27 15:03       ` David Miller
2009-07-27 15:01   ` David Miller
2009-07-27 15:18     ` Marcel Holtmann
2009-07-27 15:30       ` David Miller
2009-07-27 15:30       ` Oliver Hartkopp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).