diff options
author | Denis Vlasenko <vda@ilport.com.ua> | 2006-01-06 01:45:47 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-09 10:54:48 -0500 |
commit | 64916f1ebe93592153c72bcdb189a31e4d40049a (patch) | |
tree | b525bb438c142edb5395125cdb0163efa816cc76 /drivers | |
parent | fa45459e5e4507402350f1cdaf44b7455602770c (diff) |
[PATCH] fix a few "warning: 'cleanup_card' defined but not used"
These warnings are emitted if non-modular network drivers are built.
Fixes just move cleanup_card() definitions into #ifdef MODULE region.
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/wd.c:131: warning: 'cleanup_card' defined but not used
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/3c503.c:152: warning: 'cleanup_card' defined but not used
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/ne.c:216: warning: 'cleanup_card' defined but not used
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/hp.c:106: warning: 'cleanup_card' defined but not used
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/hp-plus.c:142: warning: 'cleanup_card' defined but not used
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/smc-ultra.c:172: warning: 'cleanup_card' defined but not used
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/e2100.c:144: warning: 'cleanup_card' defined but not used
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/es3210.c:159: warning: 'cleanup_card' defined but not used
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/lne390.c:149: warning: 'cleanup_card' defined but not used
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/lance.c:313: warning: 'cleanup_card' defined but not used
/.1/usr/srcdevel/kernel/linux-2.6.15-rc7.src/drivers/net/ac3200.c:127: warning: 'cleanup_card' defined but not used
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/3c503.c | 16 | ||||
-rw-r--r-- | drivers/net/ac3200.c | 16 | ||||
-rw-r--r-- | drivers/net/e2100.c | 14 | ||||
-rw-r--r-- | drivers/net/es3210.c | 14 | ||||
-rw-r--r-- | drivers/net/hp-plus.c | 12 | ||||
-rw-r--r-- | drivers/net/hp.c | 12 | ||||
-rw-r--r-- | drivers/net/lance.c | 22 | ||||
-rw-r--r-- | drivers/net/lne390.c | 14 | ||||
-rw-r--r-- | drivers/net/ne.c | 18 | ||||
-rw-r--r-- | drivers/net/ne2.c | 16 | ||||
-rw-r--r-- | drivers/net/smc-ultra.c | 24 | ||||
-rw-r--r-- | drivers/net/wd.c | 14 |
12 files changed, 96 insertions, 96 deletions
diff --git a/drivers/net/3c503.c b/drivers/net/3c503.c index 5c5eebdb6914..dcc98afa65d7 100644 --- a/drivers/net/3c503.c +++ b/drivers/net/3c503.c | |||
@@ -148,14 +148,6 @@ el2_pio_probe(struct net_device *dev) | |||
148 | return -ENODEV; | 148 | return -ENODEV; |
149 | } | 149 | } |
150 | 150 | ||
151 | static void cleanup_card(struct net_device *dev) | ||
152 | { | ||
153 | /* NB: el2_close() handles free_irq */ | ||
154 | release_region(dev->base_addr, EL2_IO_EXTENT); | ||
155 | if (ei_status.mem) | ||
156 | iounmap(ei_status.mem); | ||
157 | } | ||
158 | |||
159 | #ifndef MODULE | 151 | #ifndef MODULE |
160 | struct net_device * __init el2_probe(int unit) | 152 | struct net_device * __init el2_probe(int unit) |
161 | { | 153 | { |
@@ -726,6 +718,14 @@ init_module(void) | |||
726 | return -ENXIO; | 718 | return -ENXIO; |
727 | } | 719 | } |
728 | 720 | ||
721 | static void cleanup_card(struct net_device *dev) | ||
722 | { | ||
723 | /* NB: el2_close() handles free_irq */ | ||
724 | release_region(dev->base_addr, EL2_IO_EXTENT); | ||
725 | if (ei_status.mem) | ||
726 | iounmap(ei_status.mem); | ||
727 | } | ||
728 | |||
729 | void | 729 | void |
730 | cleanup_module(void) | 730 | cleanup_module(void) |
731 | { | 731 | { |
diff --git a/drivers/net/ac3200.c b/drivers/net/ac3200.c index 8a0af5453e21..7952dc6d77e3 100644 --- a/drivers/net/ac3200.c +++ b/drivers/net/ac3200.c | |||
@@ -123,14 +123,6 @@ static int __init do_ac3200_probe(struct net_device *dev) | |||
123 | return -ENODEV; | 123 | return -ENODEV; |
124 | } | 124 | } |
125 | 125 | ||
126 | static void cleanup_card(struct net_device *dev) | ||
127 | { | ||
128 | /* Someday free_irq may be in ac_close_card() */ | ||
129 | free_irq(dev->irq, dev); | ||
130 | release_region(dev->base_addr, AC_IO_EXTENT); | ||
131 | iounmap(ei_status.mem); | ||
132 | } | ||
133 | |||
134 | #ifndef MODULE | 126 | #ifndef MODULE |
135 | struct net_device * __init ac3200_probe(int unit) | 127 | struct net_device * __init ac3200_probe(int unit) |
136 | { | 128 | { |
@@ -406,6 +398,14 @@ init_module(void) | |||
406 | return -ENXIO; | 398 | return -ENXIO; |
407 | } | 399 | } |
408 | 400 | ||
401 | static void cleanup_card(struct net_device *dev) | ||
402 | { | ||
403 | /* Someday free_irq may be in ac_close_card() */ | ||
404 | free_irq(dev->irq, dev); | ||
405 | release_region(dev->base_addr, AC_IO_EXTENT); | ||
406 | iounmap(ei_status.mem); | ||
407 | } | ||
408 | |||
409 | void | 409 | void |
410 | cleanup_module(void) | 410 | cleanup_module(void) |
411 | { | 411 | { |
diff --git a/drivers/net/e2100.c b/drivers/net/e2100.c index f5a4dd7d8564..e5c5cd2a2712 100644 --- a/drivers/net/e2100.c +++ b/drivers/net/e2100.c | |||
@@ -140,13 +140,6 @@ static int __init do_e2100_probe(struct net_device *dev) | |||
140 | return -ENODEV; | 140 | return -ENODEV; |
141 | } | 141 | } |
142 | 142 | ||
143 | static void cleanup_card(struct net_device *dev) | ||
144 | { | ||
145 | /* NB: e21_close() handles free_irq */ | ||
146 | iounmap(ei_status.mem); | ||
147 | release_region(dev->base_addr, E21_IO_EXTENT); | ||
148 | } | ||
149 | |||
150 | #ifndef MODULE | 143 | #ifndef MODULE |
151 | struct net_device * __init e2100_probe(int unit) | 144 | struct net_device * __init e2100_probe(int unit) |
152 | { | 145 | { |
@@ -463,6 +456,13 @@ init_module(void) | |||
463 | return -ENXIO; | 456 | return -ENXIO; |
464 | } | 457 | } |
465 | 458 | ||
459 | static void cleanup_card(struct net_device *dev) | ||
460 | { | ||
461 | /* NB: e21_close() handles free_irq */ | ||
462 | iounmap(ei_status.mem); | ||
463 | release_region(dev->base_addr, E21_IO_EXTENT); | ||
464 | } | ||
465 | |||
466 | void | 466 | void |
467 | cleanup_module(void) | 467 | cleanup_module(void) |
468 | { | 468 | { |
diff --git a/drivers/net/es3210.c b/drivers/net/es3210.c index 50f8e23bb9e5..6b0ab1eac3fb 100644 --- a/drivers/net/es3210.c +++ b/drivers/net/es3210.c | |||
@@ -155,13 +155,6 @@ static int __init do_es_probe(struct net_device *dev) | |||
155 | return -ENODEV; | 155 | return -ENODEV; |
156 | } | 156 | } |
157 | 157 | ||
158 | static void cleanup_card(struct net_device *dev) | ||
159 | { | ||
160 | free_irq(dev->irq, dev); | ||
161 | release_region(dev->base_addr, ES_IO_EXTENT); | ||
162 | iounmap(ei_status.mem); | ||
163 | } | ||
164 | |||
165 | #ifndef MODULE | 158 | #ifndef MODULE |
166 | struct net_device * __init es_probe(int unit) | 159 | struct net_device * __init es_probe(int unit) |
167 | { | 160 | { |
@@ -456,6 +449,13 @@ init_module(void) | |||
456 | return -ENXIO; | 449 | return -ENXIO; |
457 | } | 450 | } |
458 | 451 | ||
452 | static void cleanup_card(struct net_device *dev) | ||
453 | { | ||
454 | free_irq(dev->irq, dev); | ||
455 | release_region(dev->base_addr, ES_IO_EXTENT); | ||
456 | iounmap(ei_status.mem); | ||
457 | } | ||
458 | |||
459 | void | 459 | void |
460 | cleanup_module(void) | 460 | cleanup_module(void) |
461 | { | 461 | { |
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c index 0abf5dd08b4c..74e167e7dea7 100644 --- a/drivers/net/hp-plus.c +++ b/drivers/net/hp-plus.c | |||
@@ -138,12 +138,6 @@ static int __init do_hpp_probe(struct net_device *dev) | |||
138 | return -ENODEV; | 138 | return -ENODEV; |
139 | } | 139 | } |
140 | 140 | ||
141 | static void cleanup_card(struct net_device *dev) | ||
142 | { | ||
143 | /* NB: hpp_close() handles free_irq */ | ||
144 | release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT); | ||
145 | } | ||
146 | |||
147 | #ifndef MODULE | 141 | #ifndef MODULE |
148 | struct net_device * __init hp_plus_probe(int unit) | 142 | struct net_device * __init hp_plus_probe(int unit) |
149 | { | 143 | { |
@@ -473,6 +467,12 @@ init_module(void) | |||
473 | return -ENXIO; | 467 | return -ENXIO; |
474 | } | 468 | } |
475 | 469 | ||
470 | static void cleanup_card(struct net_device *dev) | ||
471 | { | ||
472 | /* NB: hpp_close() handles free_irq */ | ||
473 | release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT); | ||
474 | } | ||
475 | |||
476 | void | 476 | void |
477 | cleanup_module(void) | 477 | cleanup_module(void) |
478 | { | 478 | { |
diff --git a/drivers/net/hp.c b/drivers/net/hp.c index 59cf841b14ab..cf9fb3698a6b 100644 --- a/drivers/net/hp.c +++ b/drivers/net/hp.c | |||
@@ -102,12 +102,6 @@ static int __init do_hp_probe(struct net_device *dev) | |||
102 | return -ENODEV; | 102 | return -ENODEV; |
103 | } | 103 | } |
104 | 104 | ||
105 | static void cleanup_card(struct net_device *dev) | ||
106 | { | ||
107 | free_irq(dev->irq, dev); | ||
108 | release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT); | ||
109 | } | ||
110 | |||
111 | #ifndef MODULE | 105 | #ifndef MODULE |
112 | struct net_device * __init hp_probe(int unit) | 106 | struct net_device * __init hp_probe(int unit) |
113 | { | 107 | { |
@@ -444,6 +438,12 @@ init_module(void) | |||
444 | return -ENXIO; | 438 | return -ENXIO; |
445 | } | 439 | } |
446 | 440 | ||
441 | static void cleanup_card(struct net_device *dev) | ||
442 | { | ||
443 | free_irq(dev->irq, dev); | ||
444 | release_region(dev->base_addr - NIC_OFFSET, HP_IO_EXTENT); | ||
445 | } | ||
446 | |||
447 | void | 447 | void |
448 | cleanup_module(void) | 448 | cleanup_module(void) |
449 | { | 449 | { |
diff --git a/drivers/net/lance.c b/drivers/net/lance.c index 1d75ca0bb939..d1d714faa6ce 100644 --- a/drivers/net/lance.c +++ b/drivers/net/lance.c | |||
@@ -309,17 +309,6 @@ static void lance_tx_timeout (struct net_device *dev); | |||
309 | 309 | ||
310 | 310 | ||
311 | 311 | ||
312 | static void cleanup_card(struct net_device *dev) | ||
313 | { | ||
314 | struct lance_private *lp = dev->priv; | ||
315 | if (dev->dma != 4) | ||
316 | free_dma(dev->dma); | ||
317 | release_region(dev->base_addr, LANCE_TOTAL_SIZE); | ||
318 | kfree(lp->tx_bounce_buffs); | ||
319 | kfree((void*)lp->rx_buffs); | ||
320 | kfree(lp); | ||
321 | } | ||
322 | |||
323 | #ifdef MODULE | 312 | #ifdef MODULE |
324 | #define MAX_CARDS 8 /* Max number of interfaces (cards) per module */ | 313 | #define MAX_CARDS 8 /* Max number of interfaces (cards) per module */ |
325 | 314 | ||
@@ -367,6 +356,17 @@ int init_module(void) | |||
367 | return -ENXIO; | 356 | return -ENXIO; |
368 | } | 357 | } |
369 | 358 | ||
359 | static void cleanup_card(struct net_device *dev) | ||
360 | { | ||
361 | struct lance_private *lp = dev->priv; | ||
362 | if (dev->dma != 4) | ||
363 | free_dma(dev->dma); | ||
364 | release_region(dev->base_addr, LANCE_TOTAL_SIZE); | ||
365 | kfree(lp->tx_bounce_buffs); | ||
366 | kfree((void*)lp->rx_buffs); | ||
367 | kfree(lp); | ||
368 | } | ||
369 | |||
370 | void cleanup_module(void) | 370 | void cleanup_module(void) |
371 | { | 371 | { |
372 | int this_dev; | 372 | int this_dev; |
diff --git a/drivers/net/lne390.c b/drivers/net/lne390.c index 309d254842cf..646e89fc3562 100644 --- a/drivers/net/lne390.c +++ b/drivers/net/lne390.c | |||
@@ -145,13 +145,6 @@ static int __init do_lne390_probe(struct net_device *dev) | |||
145 | return -ENODEV; | 145 | return -ENODEV; |
146 | } | 146 | } |
147 | 147 | ||
148 | static void cleanup_card(struct net_device *dev) | ||
149 | { | ||
150 | free_irq(dev->irq, dev); | ||
151 | release_region(dev->base_addr, LNE390_IO_EXTENT); | ||
152 | iounmap(ei_status.mem); | ||
153 | } | ||
154 | |||
155 | #ifndef MODULE | 148 | #ifndef MODULE |
156 | struct net_device * __init lne390_probe(int unit) | 149 | struct net_device * __init lne390_probe(int unit) |
157 | { | 150 | { |
@@ -440,6 +433,13 @@ int init_module(void) | |||
440 | return -ENXIO; | 433 | return -ENXIO; |
441 | } | 434 | } |
442 | 435 | ||
436 | static void cleanup_card(struct net_device *dev) | ||
437 | { | ||
438 | free_irq(dev->irq, dev); | ||
439 | release_region(dev->base_addr, LNE390_IO_EXTENT); | ||
440 | iounmap(ei_status.mem); | ||
441 | } | ||
442 | |||
443 | void cleanup_module(void) | 443 | void cleanup_module(void) |
444 | { | 444 | { |
445 | int this_dev; | 445 | int this_dev; |
diff --git a/drivers/net/ne.c b/drivers/net/ne.c index 0de8fdd2aa86..94f782d51f0f 100644 --- a/drivers/net/ne.c +++ b/drivers/net/ne.c | |||
@@ -212,15 +212,6 @@ static int __init do_ne_probe(struct net_device *dev) | |||
212 | return -ENODEV; | 212 | return -ENODEV; |
213 | } | 213 | } |
214 | 214 | ||
215 | static void cleanup_card(struct net_device *dev) | ||
216 | { | ||
217 | struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv; | ||
218 | if (idev) | ||
219 | pnp_device_detach(idev); | ||
220 | free_irq(dev->irq, dev); | ||
221 | release_region(dev->base_addr, NE_IO_EXTENT); | ||
222 | } | ||
223 | |||
224 | #ifndef MODULE | 215 | #ifndef MODULE |
225 | struct net_device * __init ne_probe(int unit) | 216 | struct net_device * __init ne_probe(int unit) |
226 | { | 217 | { |
@@ -859,6 +850,15 @@ int init_module(void) | |||
859 | return -ENODEV; | 850 | return -ENODEV; |
860 | } | 851 | } |
861 | 852 | ||
853 | static void cleanup_card(struct net_device *dev) | ||
854 | { | ||
855 | struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv; | ||
856 | if (idev) | ||
857 | pnp_device_detach(idev); | ||
858 | free_irq(dev->irq, dev); | ||
859 | release_region(dev->base_addr, NE_IO_EXTENT); | ||
860 | } | ||
861 | |||
862 | void cleanup_module(void) | 862 | void cleanup_module(void) |
863 | { | 863 | { |
864 | int this_dev; | 864 | int this_dev; |
diff --git a/drivers/net/ne2.c b/drivers/net/ne2.c index 6d62ada85de6..e6df375a1d4b 100644 --- a/drivers/net/ne2.c +++ b/drivers/net/ne2.c | |||
@@ -278,14 +278,6 @@ static int __init do_ne2_probe(struct net_device *dev) | |||
278 | return -ENODEV; | 278 | return -ENODEV; |
279 | } | 279 | } |
280 | 280 | ||
281 | static void cleanup_card(struct net_device *dev) | ||
282 | { | ||
283 | mca_mark_as_unused(ei_status.priv); | ||
284 | mca_set_adapter_procfn( ei_status.priv, NULL, NULL); | ||
285 | free_irq(dev->irq, dev); | ||
286 | release_region(dev->base_addr, NE_IO_EXTENT); | ||
287 | } | ||
288 | |||
289 | #ifndef MODULE | 281 | #ifndef MODULE |
290 | struct net_device * __init ne2_probe(int unit) | 282 | struct net_device * __init ne2_probe(int unit) |
291 | { | 283 | { |
@@ -812,6 +804,14 @@ int init_module(void) | |||
812 | return -ENXIO; | 804 | return -ENXIO; |
813 | } | 805 | } |
814 | 806 | ||
807 | static void cleanup_card(struct net_device *dev) | ||
808 | { | ||
809 | mca_mark_as_unused(ei_status.priv); | ||
810 | mca_set_adapter_procfn( ei_status.priv, NULL, NULL); | ||
811 | free_irq(dev->irq, dev); | ||
812 | release_region(dev->base_addr, NE_IO_EXTENT); | ||
813 | } | ||
814 | |||
815 | void cleanup_module(void) | 815 | void cleanup_module(void) |
816 | { | 816 | { |
817 | int this_dev; | 817 | int this_dev; |
diff --git a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c index ba8593ac3f8a..3db30cd0625e 100644 --- a/drivers/net/smc-ultra.c +++ b/drivers/net/smc-ultra.c | |||
@@ -168,18 +168,6 @@ static int __init do_ultra_probe(struct net_device *dev) | |||
168 | return -ENODEV; | 168 | return -ENODEV; |
169 | } | 169 | } |
170 | 170 | ||
171 | static void cleanup_card(struct net_device *dev) | ||
172 | { | ||
173 | /* NB: ultra_close_card() does free_irq */ | ||
174 | #ifdef __ISAPNP__ | ||
175 | struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv; | ||
176 | if (idev) | ||
177 | pnp_device_detach(idev); | ||
178 | #endif | ||
179 | release_region(dev->base_addr - ULTRA_NIC_OFFSET, ULTRA_IO_EXTENT); | ||
180 | iounmap(ei_status.mem); | ||
181 | } | ||
182 | |||
183 | #ifndef MODULE | 171 | #ifndef MODULE |
184 | struct net_device * __init ultra_probe(int unit) | 172 | struct net_device * __init ultra_probe(int unit) |
185 | { | 173 | { |
@@ -594,6 +582,18 @@ init_module(void) | |||
594 | return -ENXIO; | 582 | return -ENXIO; |
595 | } | 583 | } |
596 | 584 | ||
585 | static void cleanup_card(struct net_device *dev) | ||
586 | { | ||
587 | /* NB: ultra_close_card() does free_irq */ | ||
588 | #ifdef __ISAPNP__ | ||
589 | struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv; | ||
590 | if (idev) | ||
591 | pnp_device_detach(idev); | ||
592 | #endif | ||
593 | release_region(dev->base_addr - ULTRA_NIC_OFFSET, ULTRA_IO_EXTENT); | ||
594 | iounmap(ei_status.mem); | ||
595 | } | ||
596 | |||
597 | void | 597 | void |
598 | cleanup_module(void) | 598 | cleanup_module(void) |
599 | { | 599 | { |
diff --git a/drivers/net/wd.c b/drivers/net/wd.c index b03feae459fc..7caa8dc88a58 100644 --- a/drivers/net/wd.c +++ b/drivers/net/wd.c | |||
@@ -127,13 +127,6 @@ static int __init do_wd_probe(struct net_device *dev) | |||
127 | return -ENODEV; | 127 | return -ENODEV; |
128 | } | 128 | } |
129 | 129 | ||
130 | static void cleanup_card(struct net_device *dev) | ||
131 | { | ||
132 | free_irq(dev->irq, dev); | ||
133 | release_region(dev->base_addr - WD_NIC_OFFSET, WD_IO_EXTENT); | ||
134 | iounmap(ei_status.mem); | ||
135 | } | ||
136 | |||
137 | #ifndef MODULE | 130 | #ifndef MODULE |
138 | struct net_device * __init wd_probe(int unit) | 131 | struct net_device * __init wd_probe(int unit) |
139 | { | 132 | { |
@@ -538,6 +531,13 @@ init_module(void) | |||
538 | return -ENXIO; | 531 | return -ENXIO; |
539 | } | 532 | } |
540 | 533 | ||
534 | static void cleanup_card(struct net_device *dev) | ||
535 | { | ||
536 | free_irq(dev->irq, dev); | ||
537 | release_region(dev->base_addr - WD_NIC_OFFSET, WD_IO_EXTENT); | ||
538 | iounmap(ei_status.mem); | ||
539 | } | ||
540 | |||
541 | void | 541 | void |
542 | cleanup_module(void) | 542 | cleanup_module(void) |
543 | { | 543 | { |