Skip to contentSkip to conversation

2.5.59 fails compile 3c509.c

DISCUSSION Pete Clements 2 participants 3 messages Jan 17, 2003 Network drivers

lore
Share & tools
lore
#0 lore raw

FYI:

gcc -Wp,-MD,drivers/net/.3c509.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc -iwithprefix include -DKBUILD_BASENAME=3c509 -DKBUILD_MODNAME=3c509 -c -o drivers/net/3c509.o drivers/net/3c509.c
drivers/net/3c509.c: In function `el3_probe':
drivers/net/3c509.c:584: warning: label found' defined but not used drivers/net/3c509.c: In function el3_close':
drivers/net/3c509.c:1083: structure has no member named `edev' drivers/net/3c509.c: At top level:
drivers/net/3c509.c:268: warning: `nopnp' defined but not used make[2]: *** [drivers/net/3c509.o] Error 1
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

Signature · 2 lines
Pete Clements 
[email protected]
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Pete" == Pete Clements <[email protected]> writes:

Pete> FYI:
Pete> gcc -Wp,-MD,drivers/net/.3c509.o.d -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc -iwithprefix include -DKBUILD_BASENAME=3c509 -DKBUILD_MODNAME=3c509 -c -o drivers/net/3c509.o drivers/net/3c509.c
Pete> drivers/net/3c509.c: In function `el3_probe':
Pete> drivers/net/3c509.c:584: warning: label found' defined but not used Pete> drivers/net/3c509.c: In function el3_close':
Pete> drivers/net/3c509.c:1083: structure has no member named `edev' Pete> drivers/net/3c509.c: At top level:
Pete> drivers/net/3c509.c:268: warning: `nopnp' defined but not used Pete> make[2]: *** [drivers/net/3c509.o] Error 1
Pete> make[1]: *** [drivers/net] Error 2
Pete> make: *** [drivers] Error 2

Could you please try the following patch ?

Thanks,

        M.

===== drivers/net/3c509.c 1.30 vs edited =====

drivers/net/3c509.c +12 -10
@@ -319,16 +319,6 @@
 	dev->watchdog_timeo = TX_TIMEOUT;
 	dev->do_ioctl = netdev_ioctl;
 
-#ifdef CONFIG_PM
-	/* register power management */
-	lp->pmdev = pm_register(PM_ISA_DEV, card_idx, el3_pm_callback);
-	if (lp->pmdev) {
-		struct pm_dev *p;
-		p = lp->pmdev;
-		p->data = (struct net_device *)dev;
-	}
-#endif
-
 	return 0;
 }
 
@@ -598,6 +588,16 @@
 #endif
 	lp->mca_slot = mca_slot;
 
+#ifdef CONFIG_PM
+	/* register power management */
+	lp->pmdev = pm_register(PM_ISA_DEV, card_idx, el3_pm_callback);
+	if (lp->pmdev) {
+		struct pm_dev *p;
+		p = lp->pmdev;
+		p->data = (struct net_device *)dev;
+	}
+#endif
+
 	return el3_common_init (dev);
 }
 
@@ -1080,12 +1080,14 @@
 	free_irq(dev->irq, dev);
 	/* Switching back to window 0 disables the IRQ. */
 	EL3WINDOW(0);
+#ifdef CONFIG_EISA
 	if (!lp->edev) {
 	    /* But we explicitly zero the IRQ line select anyway. Don't do
 	     * it on EISA cards, it prevents the module from getting an
 	     * IRQ after unload+reload... */
 	    outw(0x0f00, ioaddr + WN0_IRQ);
 	}
+#endif
 
 	return 0;
 }
Signature · 1 line
Places change, faces change. Life is so very strange.
#2 lore raw

Quoting Marc Zyngier

Quoted 63 lines

Could you please try the following patch ?

Thanks,

        M.

===== drivers/net/3c509.c 1.30 vs edited =====

drivers/net/3c509.c +12 -10
@@ -319,16 +319,6 @@
 	dev->watchdog_timeo = TX_TIMEOUT;
 	dev->do_ioctl = netdev_ioctl;
 
-#ifdef CONFIG_PM
-	/* register power management */
-	lp->pmdev = pm_register(PM_ISA_DEV, card_idx, el3_pm_callback);
-	if (lp->pmdev) {
-		struct pm_dev *p;
-		p = lp->pmdev;
-		p->data = (struct net_device *)dev;
-	}
-#endif
-
 	return 0;
 }
 
@@ -598,6 +588,16 @@
 #endif
 	lp->mca_slot = mca_slot;
 
+#ifdef CONFIG_PM
+	/* register power management */
+	lp->pmdev = pm_register(PM_ISA_DEV, card_idx, el3_pm_callback);
+	if (lp->pmdev) {
+		struct pm_dev *p;
+		p = lp->pmdev;
+		p->data = (struct net_device *)dev;
+	}
+#endif
+
 	return el3_common_init (dev);
 }
 
@@ -1080,12 +1080,14 @@
 	free_irq(dev->irq, dev);
 	/* Switching back to window 0 disables the IRQ. */
 	EL3WINDOW(0);
+#ifdef CONFIG_EISA
 	if (!lp->edev) {
 	    /* But we explicitly zero the IRQ line select anyway. Don't do
 	     * it on EISA cards, it prevents the module from getting an
 	     * IRQ after unload+reload... */
 	    outw(0x0f00, ioaddr + WN0_IRQ);
 	}
+#endif
 
 	return 0;
 }
Signature · 2 lines
-- 
Places change, faces change. Life is so very strange.

Patch fixes the compile problem.

Signature · 2 lines
Pete Clements 
[email protected]