diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2007-02-09 11:38:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-09 12:14:07 -0500 |
commit | 4ec031166f6a466a443f462e567f7551096b1741 (patch) | |
tree | 2f59cd620ddd83436a16c8e5a494d6147a398716 | |
parent | b81831c69afb82c0545d3de729290fab4e50d429 (diff) |
[PATCH] kill eth_io_copy_and_sum()
On all targets that sucker boils down to memcpy_fromio(sbk->data, from, len).
The function name is highly misguiding (it _never_ does any checksums), the
last argument is just a noise and simply expanding the call to memcpy_fromio()
gives shorter and more readable source. For a lot of reasons it has almost
no remaining users, so it's better to just outright kill it.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/net/3c503.c | 3 | ||||
-rw-r--r-- | drivers/net/ac3200.c | 3 | ||||
-rw-r--r-- | drivers/net/e2100.c | 3 | ||||
-rw-r--r-- | drivers/net/es3210.c | 2 | ||||
-rw-r--r-- | drivers/net/smc-mca.c | 3 | ||||
-rw-r--r-- | drivers/net/smc-ultra.c | 3 | ||||
-rw-r--r-- | drivers/net/smc-ultra32.c | 3 | ||||
-rw-r--r-- | drivers/net/wd.c | 2 | ||||
-rw-r--r-- | include/asm-alpha/io.h | 9 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/io.h | 3 | ||||
-rw-r--r-- | include/asm-arm/io.h | 5 | ||||
-rw-r--r-- | include/asm-cris/io.h | 5 | ||||
-rw-r--r-- | include/asm-i386/io.h | 6 | ||||
-rw-r--r-- | include/asm-mips/io.h | 6 | ||||
-rw-r--r-- | include/asm-parisc/io.h | 9 | ||||
-rw-r--r-- | include/asm-ppc/io.h | 2 | ||||
-rw-r--r-- | include/asm-x86_64/io.h | 6 |
17 files changed, 8 insertions, 65 deletions
diff --git a/drivers/net/3c503.c b/drivers/net/3c503.c index 7e34c4f07b70..bc7e906571d3 100644 --- a/drivers/net/3c503.c +++ b/drivers/net/3c503.c | |||
@@ -600,8 +600,7 @@ el2_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring | |||
600 | count -= semi_count; | 600 | count -= semi_count; |
601 | memcpy_fromio(skb->data + semi_count, base + ei_status.priv, count); | 601 | memcpy_fromio(skb->data + semi_count, base + ei_status.priv, count); |
602 | } else { | 602 | } else { |
603 | /* Packet is in one chunk -- we can copy + cksum. */ | 603 | memcpy_fromio(skb->data, base + ring_offset, count); |
604 | eth_io_copy_and_sum(skb, base + ring_offset, count, 0); | ||
605 | } | 604 | } |
606 | return; | 605 | return; |
607 | } | 606 | } |
diff --git a/drivers/net/ac3200.c b/drivers/net/ac3200.c index c01f87f5bed7..644c408515df 100644 --- a/drivers/net/ac3200.c +++ b/drivers/net/ac3200.c | |||
@@ -327,8 +327,7 @@ static void ac_block_input(struct net_device *dev, int count, struct sk_buff *sk | |||
327 | memcpy_fromio(skb->data + semi_count, | 327 | memcpy_fromio(skb->data + semi_count, |
328 | ei_status.mem + TX_PAGES*256, count); | 328 | ei_status.mem + TX_PAGES*256, count); |
329 | } else { | 329 | } else { |
330 | /* Packet is in one chunk -- we can copy + cksum. */ | 330 | memcpy_fromio(skb->data, start, count); |
331 | eth_io_copy_and_sum(skb, start, count, 0); | ||
332 | } | 331 | } |
333 | } | 332 | } |
334 | 333 | ||
diff --git a/drivers/net/e2100.c b/drivers/net/e2100.c index c62d9c6363c6..b2b0a96218ca 100644 --- a/drivers/net/e2100.c +++ b/drivers/net/e2100.c | |||
@@ -355,8 +355,7 @@ e21_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring | |||
355 | 355 | ||
356 | mem_on(ioaddr, shared_mem, (ring_offset>>8)); | 356 | mem_on(ioaddr, shared_mem, (ring_offset>>8)); |
357 | 357 | ||
358 | /* Packet is always in one chunk -- we can copy + cksum. */ | 358 | memcpy_fromio(skb->data, ei_status.mem + (ring_offset & 0xff), count); |
359 | eth_io_copy_and_sum(skb, ei_status.mem + (ring_offset & 0xff), count, 0); | ||
360 | 359 | ||
361 | mem_off(ioaddr); | 360 | mem_off(ioaddr); |
362 | } | 361 | } |
diff --git a/drivers/net/es3210.c b/drivers/net/es3210.c index 2d2ea94a00bb..822e5bfd1a71 100644 --- a/drivers/net/es3210.c +++ b/drivers/net/es3210.c | |||
@@ -375,7 +375,7 @@ static void es_block_input(struct net_device *dev, int count, struct sk_buff *sk | |||
375 | memcpy_fromio(skb->data + semi_count, ei_status.mem, count); | 375 | memcpy_fromio(skb->data + semi_count, ei_status.mem, count); |
376 | } else { | 376 | } else { |
377 | /* Packet is in one chunk. */ | 377 | /* Packet is in one chunk. */ |
378 | eth_io_copy_and_sum(skb, xfer_start, count, 0); | 378 | memcpy_fromio(skb->data, xfer_start, count); |
379 | } | 379 | } |
380 | } | 380 | } |
381 | 381 | ||
diff --git a/drivers/net/smc-mca.c b/drivers/net/smc-mca.c index 7122932eac90..ae1ae343beed 100644 --- a/drivers/net/smc-mca.c +++ b/drivers/net/smc-mca.c | |||
@@ -482,8 +482,7 @@ static void ultramca_block_input(struct net_device *dev, int count, struct sk_bu | |||
482 | count -= semi_count; | 482 | count -= semi_count; |
483 | memcpy_fromio(skb->data + semi_count, ei_status.mem + TX_PAGES * 256, count); | 483 | memcpy_fromio(skb->data + semi_count, ei_status.mem + TX_PAGES * 256, count); |
484 | } else { | 484 | } else { |
485 | /* Packet is in one chunk -- we can copy + cksum. */ | 485 | memcpy_fromio(skb->data, xfer_start, count); |
486 | eth_io_copy_and_sum(skb, xfer_start, count, 0); | ||
487 | } | 486 | } |
488 | 487 | ||
489 | } | 488 | } |
diff --git a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c index d70bc9795346..a52b22d7db65 100644 --- a/drivers/net/smc-ultra.c +++ b/drivers/net/smc-ultra.c | |||
@@ -454,8 +454,7 @@ ultra_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ri | |||
454 | count -= semi_count; | 454 | count -= semi_count; |
455 | memcpy_fromio(skb->data + semi_count, ei_status.mem + TX_PAGES * 256, count); | 455 | memcpy_fromio(skb->data + semi_count, ei_status.mem + TX_PAGES * 256, count); |
456 | } else { | 456 | } else { |
457 | /* Packet is in one chunk -- we can copy + cksum. */ | 457 | memcpy_fromio(skb->data, xfer_start, count); |
458 | eth_io_copy_and_sum(skb, xfer_start, count, 0); | ||
459 | } | 458 | } |
460 | 459 | ||
461 | outb(0x00, dev->base_addr - ULTRA_NIC_OFFSET); /* Disable memory. */ | 460 | outb(0x00, dev->base_addr - ULTRA_NIC_OFFSET); /* Disable memory. */ |
diff --git a/drivers/net/smc-ultra32.c b/drivers/net/smc-ultra32.c index 2c5319c62fa5..88a30e56c64c 100644 --- a/drivers/net/smc-ultra32.c +++ b/drivers/net/smc-ultra32.c | |||
@@ -395,8 +395,7 @@ static void ultra32_block_input(struct net_device *dev, | |||
395 | memcpy_fromio(skb->data + semi_count, ei_status.mem + TX_PAGES * 256, count); | 395 | memcpy_fromio(skb->data + semi_count, ei_status.mem + TX_PAGES * 256, count); |
396 | } | 396 | } |
397 | } else { | 397 | } else { |
398 | /* Packet is in one chunk -- we can copy + cksum. */ | 398 | memcpy_fromio(skb->data, xfer_start, count); |
399 | eth_io_copy_and_sum(skb, xfer_start, count, 0); | ||
400 | } | 399 | } |
401 | } | 400 | } |
402 | 401 | ||
diff --git a/drivers/net/wd.c b/drivers/net/wd.c index 7f38012b9c92..a0326818ff2f 100644 --- a/drivers/net/wd.c +++ b/drivers/net/wd.c | |||
@@ -433,7 +433,7 @@ wd_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_ | |||
433 | memcpy_fromio(skb->data + semi_count, ei_status.mem + TX_PAGES * 256, count); | 433 | memcpy_fromio(skb->data + semi_count, ei_status.mem + TX_PAGES * 256, count); |
434 | } else { | 434 | } else { |
435 | /* Packet is in one chunk -- we can copy + cksum. */ | 435 | /* Packet is in one chunk -- we can copy + cksum. */ |
436 | eth_io_copy_and_sum(skb, xfer_start, count, 0); | 436 | memcpy_fromio(skb->data, xfer_start, count); |
437 | } | 437 | } |
438 | 438 | ||
439 | /* Turn off 16 bit access so that reboot works. ISA brain-damage */ | 439 | /* Turn off 16 bit access so that reboot works. ISA brain-damage */ |
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h index 5d15af24573b..24bdcc8b63aa 100644 --- a/include/asm-alpha/io.h +++ b/include/asm-alpha/io.h | |||
@@ -525,15 +525,6 @@ extern void outsw (unsigned long port, const void *src, unsigned long count); | |||
525 | extern void outsl (unsigned long port, const void *src, unsigned long count); | 525 | extern void outsl (unsigned long port, const void *src, unsigned long count); |
526 | 526 | ||
527 | /* | 527 | /* |
528 | * XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and | ||
529 | * just copy it. The net code will then do the checksum later. Presently | ||
530 | * only used by some shared memory 8390 Ethernet cards anyway. | ||
531 | */ | ||
532 | |||
533 | #define eth_io_copy_and_sum(skb,src,len,unused) \ | ||
534 | memcpy_fromio((skb)->data,src,len) | ||
535 | |||
536 | /* | ||
537 | * The Alpha Jensen hardware for some rather strange reason puts | 528 | * The Alpha Jensen hardware for some rather strange reason puts |
538 | * the RTC clock at 0x170 instead of 0x70. Probably due to some | 529 | * the RTC clock at 0x170 instead of 0x70. Probably due to some |
539 | * misguided idea about using 0x70 for NMI stuff. | 530 | * misguided idea about using 0x70 for NMI stuff. |
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index 0d517267fb63..b7b5414d9320 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -238,9 +238,6 @@ __ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count) | |||
238 | #define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l)) | 238 | #define memcpy_fromio(a,c,l) _memcpy_fromio((a),(c),(l)) |
239 | #define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l)) | 239 | #define memcpy_toio(c,a,l) _memcpy_toio((c),(a),(l)) |
240 | 240 | ||
241 | #define eth_io_copy_and_sum(s,c,l,b) \ | ||
242 | eth_copy_and_sum((s),__mem_pci(c),(l),(b)) | ||
243 | |||
244 | static inline int | 241 | static inline int |
245 | check_signature(const unsigned char __iomem *bus_addr, const unsigned char *signature, | 242 | check_signature(const unsigned char __iomem *bus_addr, const unsigned char *signature, |
246 | int length) | 243 | int length) |
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index 288f76b166d0..5f60b4220906 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
@@ -182,9 +182,6 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
182 | #define memcpy_fromio(a,c,l) _memcpy_fromio((a),__mem_pci(c),(l)) | 182 | #define memcpy_fromio(a,c,l) _memcpy_fromio((a),__mem_pci(c),(l)) |
183 | #define memcpy_toio(c,a,l) _memcpy_toio(__mem_pci(c),(a),(l)) | 183 | #define memcpy_toio(c,a,l) _memcpy_toio(__mem_pci(c),(a),(l)) |
184 | 184 | ||
185 | #define eth_io_copy_and_sum(s,c,l,b) \ | ||
186 | eth_copy_and_sum((s),__mem_pci(c),(l),(b)) | ||
187 | |||
188 | #elif !defined(readb) | 185 | #elif !defined(readb) |
189 | 186 | ||
190 | #define readb(c) (__readwrite_bug("readb"),0) | 187 | #define readb(c) (__readwrite_bug("readb"),0) |
@@ -194,8 +191,6 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
194 | #define writew(v,c) __readwrite_bug("writew") | 191 | #define writew(v,c) __readwrite_bug("writew") |
195 | #define writel(v,c) __readwrite_bug("writel") | 192 | #define writel(v,c) __readwrite_bug("writel") |
196 | 193 | ||
197 | #define eth_io_copy_and_sum(s,c,l,b) __readwrite_bug("eth_io_copy_and_sum") | ||
198 | |||
199 | #define check_signature(io,sig,len) (0) | 194 | #define check_signature(io,sig,len) (0) |
200 | 195 | ||
201 | #endif /* __mem_pci */ | 196 | #endif /* __mem_pci */ |
diff --git a/include/asm-cris/io.h b/include/asm-cris/io.h index 716c69bc58f8..d196dd6b2df3 100644 --- a/include/asm-cris/io.h +++ b/include/asm-cris/io.h | |||
@@ -121,11 +121,6 @@ static inline void writel(unsigned int b, volatile void __iomem *addr) | |||
121 | #define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) | 121 | #define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) |
122 | #define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) | 122 | #define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) |
123 | 123 | ||
124 | /* | ||
125 | * Again, CRIS does not require mem IO specific function. | ||
126 | */ | ||
127 | |||
128 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d)) | ||
129 | 124 | ||
130 | /* The following is junk needed for the arch-independent code but which | 125 | /* The following is junk needed for the arch-independent code but which |
131 | * we never use in the CRIS port | 126 | * we never use in the CRIS port |
diff --git a/include/asm-i386/io.h b/include/asm-i386/io.h index 86ff5e83be2f..59fe616933c4 100644 --- a/include/asm-i386/io.h +++ b/include/asm-i386/io.h | |||
@@ -219,12 +219,6 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int | |||
219 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) | 219 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) |
220 | 220 | ||
221 | /* | 221 | /* |
222 | * Again, i386 does not require mem IO specific function. | ||
223 | */ | ||
224 | |||
225 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(b),(c),(d)) | ||
226 | |||
227 | /* | ||
228 | * Cache management | 222 | * Cache management |
229 | * | 223 | * |
230 | * This needed for two cases | 224 | * This needed for two cases |
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h index 67f081078904..b6a2eb816628 100644 --- a/include/asm-mips/io.h +++ b/include/asm-mips/io.h | |||
@@ -556,12 +556,6 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | |||
556 | #define __ISA_IO_base ((char *)(isa_slot_offset)) | 556 | #define __ISA_IO_base ((char *)(isa_slot_offset)) |
557 | 557 | ||
558 | /* | 558 | /* |
559 | * We don't have csum_partial_copy_fromio() yet, so we cheat here and | ||
560 | * just copy it. The net code will then do the checksum later. | ||
561 | */ | ||
562 | #define eth_io_copy_and_sum(skb,src,len,unused) memcpy_fromio((skb)->data,(src),(len)) | ||
563 | |||
564 | /* | ||
565 | * The caches on some architectures aren't dma-coherent and have need to | 559 | * The caches on some architectures aren't dma-coherent and have need to |
566 | * handle this in software. There are three types of operations that | 560 | * handle this in software. There are three types of operations that |
567 | * can be applied to dma buffers. | 561 | * can be applied to dma buffers. |
diff --git a/include/asm-parisc/io.h b/include/asm-parisc/io.h index c1963ce19dd2..ca46e7cc0940 100644 --- a/include/asm-parisc/io.h +++ b/include/asm-parisc/io.h | |||
@@ -191,15 +191,6 @@ void memset_io(volatile void __iomem *addr, unsigned char val, int count); | |||
191 | void memcpy_fromio(void *dst, const volatile void __iomem *src, int count); | 191 | void memcpy_fromio(void *dst, const volatile void __iomem *src, int count); |
192 | void memcpy_toio(volatile void __iomem *dst, const void *src, int count); | 192 | void memcpy_toio(volatile void __iomem *dst, const void *src, int count); |
193 | 193 | ||
194 | /* | ||
195 | * XXX - We don't have csum_partial_copy_fromio() yet, so we cheat here and | ||
196 | * just copy it. The net code will then do the checksum later. Presently | ||
197 | * only used by some shared memory 8390 Ethernet cards anyway. | ||
198 | */ | ||
199 | |||
200 | #define eth_io_copy_and_sum(skb,src,len,unused) \ | ||
201 | memcpy_fromio((skb)->data,(src),(len)) | ||
202 | |||
203 | /* Port-space IO */ | 194 | /* Port-space IO */ |
204 | 195 | ||
205 | #define inb_p inb | 196 | #define inb_p inb |
diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index ccf1a9bb2e43..95d590423cf2 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h | |||
@@ -358,8 +358,6 @@ static inline void memcpy_toio(volatile void __iomem *dst, const void *src, int | |||
358 | } | 358 | } |
359 | #endif | 359 | #endif |
360 | 360 | ||
361 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void __force *)(void __iomem *)(b),(c),(d)) | ||
362 | |||
363 | /* | 361 | /* |
364 | * Map in an area of physical address space, for accessing | 362 | * Map in an area of physical address space, for accessing |
365 | * I/O devices etc. | 363 | * I/O devices etc. |
diff --git a/include/asm-x86_64/io.h b/include/asm-x86_64/io.h index 6ee9fadaaacb..f5d84bb7c948 100644 --- a/include/asm-x86_64/io.h +++ b/include/asm-x86_64/io.h | |||
@@ -248,12 +248,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c); | |||
248 | */ | 248 | */ |
249 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) | 249 | #define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET)) |
250 | 250 | ||
251 | /* | ||
252 | * Again, x86-64 does not require mem IO specific function. | ||
253 | */ | ||
254 | |||
255 | #define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d)) | ||
256 | |||
257 | /* Nothing to do */ | 251 | /* Nothing to do */ |
258 | 252 | ||
259 | #define dma_cache_inv(_start,_size) do { } while (0) | 253 | #define dma_cache_inv(_start,_size) do { } while (0) |