Message ID | 4A6D512A.1050504@gmail.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
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 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 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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 ! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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) {