Carsten Schiers
2010-Oct-12 08:56 UTC
[Xen-devel] Problem compiling Kernel 2.6.18 - netfront.c
Hi, do I have a problem with my .config or does changeset 578f036ec7dd miss some declaration? CC drivers/xen/netfront/netfront.o drivers/xen/netfront/netfront.c: In function ''netfront_get_drvinfo'': drivers/xen/netfront/netfront.c:1779: warning: implicit declaration of function ''dev_name'' drivers/xen/netfront/netfront.c:1779: error: ''struct net_device'' has no member n amed ''dev'' drivers/xen/netfront/netfront.c:1779: warning: passing argument 2 of ''strcpy'' ma kes pointer from integer without a cast make[3]: *** [drivers/xen/netfront/netfront.o] Fehler 1 make[2]: *** [drivers/xen/netfront] Fehler 2 make[1]: *** [drivers/xen] Fehler 2 make: *** [drivers] Fehler 2 BR, Carsten. Tap for keyboard Back Scroll Send Text Nav ABC .?123 Ctrl Fn Back Scroll esc home pgup ⇡ pgdn tab end ⇠ ⇣ ⇢ Text Nav ABC .?123 Ctrl Fn Back Scroll q w e r t y u i o p a s d f g h j k l z x c v b n m sp Text Nav ABC .?123 Ctrl Fn Back Scroll Q W E R T Y U I O P A S D F G H J K L Z X C V B N M sp Text Nav ABC .?123 Ctrl Fn Back Scroll 1 2 3 4 5 6 7 8 9 0 - / : ; ( ) $ & @ #+ . , ? ! '' " sp Text Nav ABC .?123 Ctrl Fn Back Scroll [ ] { } # % ^ * + _ \ | ~ <>` 123 . , ? ! '' " sp Text Nav ABC .?123 Ctrl Fn Back Scroll ^Q ^W ^E ^R ^T ^Y ^U ^I ^O ^P ^A ^S ^D ^F ^G ^H ^J ^K ^L ^Z ^X ^C ^V ^B ^N ^M sp Text Nav ABC .?123 Ctrl Fn Back Scroll ^@ ^\ ^] ^^ ^_ sp Text Nav ABC .?123 Ctrl Fn Back Scroll F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Text Nav ABC .?123 Ctrl Fn _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ian Campbell
2010-Oct-12 09:20 UTC
Re: [Xen-devel] Problem compiling Kernel 2.6.18 - netfront.c
On Tue, 2010-10-12 at 09:56 +0100, Carsten Schiers wrote:> > > Hi, > > do I have a problem with my .config or does changeset 578f036ec7dd miss some declaration? > > CC drivers/xen/netfront/netfront.o > drivers/xen/netfront/netfront.c: In function ''netfront_get_drvinfo'': > drivers/xen/netfront/netfront.c:1779: warning: implicit declaration of function > ''dev_name'' > drivers/xen/netfront/netfront.c:1779: error: ''struct net_device'' has no member n > amed ''dev'' > drivers/xen/netfront/netfront.c:1779: warning: passing argument 2 of ''strcpy'' ma > kes pointer from integer without a cast > make[3]: *** [drivers/xen/netfront/netfront.o] Fehler 1 > make[2]: *** [drivers/xen/netfront] Fehler 2 > make[1]: *** [drivers/xen] Fehler 2 > make: *** [drivers] Fehler 2Looks like 2.6.18 sysfs differs from whichever kernel the patch was originally written against. Untested patch based on the netback get_drvinfo method from 2.6.18 below, does it work for you? diff -r 578f036ec7dd drivers/xen/netfront/netfront.c --- a/drivers/xen/netfront/netfront.c Mon Oct 11 10:25:55 2010 +0100 +++ b/drivers/xen/netfront/netfront.c Tue Oct 12 10:19:15 2010 +0100 @@ -1776,7 +1776,7 @@ static void netfront_get_drvinfo(struct struct ethtool_drvinfo *info) { strcpy(info->driver, "netfront"); - strcpy(info->bus_info, dev_name(dev->dev.parent)); + strcpy(info->bus_info, dev->class_dev.dev->bus_id); } static int network_connect(struct net_device *dev) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2010-Oct-12 09:54 UTC
Re: [Xen-devel] Problem compiling Kernel 2.6.18 - netfront.c
>>> On 12.10.10 at 11:20, Ian Campbell <Ian.Campbell@citrix.com> wrote: > Looks like 2.6.18 sysfs differs from whichever kernel the patch was > originally written against.Yes, I''m sorry for that, I didn''t notice that the corresponding code in netback changed twice (in .21 and .30).> Untested patch based on the netback get_drvinfo method from 2.6.18 > below, does it work for you?Looks exactly like what''s needed. Acked-by: Jan Beulich <jbeulich@novell.com>> diff -r 578f036ec7dd drivers/xen/netfront/netfront.c > --- a/drivers/xen/netfront/netfront.c Mon Oct 11 10:25:55 2010 +0100 > +++ b/drivers/xen/netfront/netfront.c Tue Oct 12 10:19:15 2010 +0100 > @@ -1776,7 +1776,7 @@ static void netfront_get_drvinfo(struct > struct ethtool_drvinfo *info) > { > strcpy(info->driver, "netfront"); > - strcpy(info->bus_info, dev_name(dev->dev.parent)); > + strcpy(info->bus_info, dev->class_dev.dev->bus_id); > } > > static int network_connect(struct net_device *dev) > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Carsten Schiers
2010-Oct-12 10:34 UTC
AW: [Xen-devel] Problem compiling Kernel 2.6.18 - netfront.c
Sorry, my machine is pretty slow and I wanted to do a fresh compile... Yes, solves the issue. Just saw that the patch is already in the repo. Thanks, Carsten. ----- Originalnachricht ----- Von: Jan Beulich <JBeulich@novell.com> Gesendet: Die, 12.10.2010 11:54 An: Ian Campbell <Ian.Campbell@citrix.com> ; Carsten Schiers <carsten@schiers.de> Cc: xen-devel@lists.xensource.com ; Ky Srinivasan <KSrinivasan@novell.com> Betreff: Re: [Xen-devel] Problem compiling Kernel 2.6.18 - netfront.c>>> On 12.10.10 at 11:20, Ian Campbell <Ian.Campbell@citrix.com> wrote: > Looks like 2.6.18 sysfs differs from whichever kernel the patch was > originally written against.Yes, I''m sorry for that, I didn''t notice that the corresponding code in netback changed twice (in .21 and .30).> Untested patch based on the netback get_drvinfo method from 2.6.18 > below, does it work for you?Looks exactly like what''s needed. Acked-by: Jan Beulich <jbeulich@novell.com>> diff -r 578f036ec7dd drivers/xen/netfront/netfront.c > --- a/drivers/xen/netfront/netfront.c Mon Oct 11 10:25:55 2010 +0100 > +++ b/drivers/xen/netfront/netfront.c Tue Oct 12 10:19:15 2010 +0100 > @@ -1776,7 +1776,7 @@ static void netfront_get_drvinfo(struct > struct ethtool_drvinfo *info) > { > strcpy(info->driver, "netfront"); > - strcpy(info->bus_info, dev_name(dev->dev.parent)); > + strcpy(info->bus_info, dev->class_dev.dev->bus_id); > } > > static int network_connect(struct net_device *dev) > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel