aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mac8390.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-01-04 06:53:00 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-06 23:44:02 -0500
commit5c7fffd0e3b57cb63f50bbd710868f012d67654f (patch)
treece0e85d7c748b956aaa8a24d869dfde31a74a9cb /drivers/net/mac8390.c
parent35076402a9936fa8a73b57a1f97fecbeceeec34a (diff)
drivers/net/mac8390.c: Remove useless memcpy casting
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mac8390.c')
-rw-r--r--drivers/net/mac8390.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c
index 6b6f375440a2..517cee45c086 100644
--- a/drivers/net/mac8390.c
+++ b/drivers/net/mac8390.c
@@ -237,14 +237,14 @@ static enum mac8390_access __init mac8390_testio(volatile unsigned long membase)
237 unsigned long outdata = 0xA5A0B5B0; 237 unsigned long outdata = 0xA5A0B5B0;
238 unsigned long indata = 0x00000000; 238 unsigned long indata = 0x00000000;
239 /* Try writing 32 bits */ 239 /* Try writing 32 bits */
240 memcpy((char *)membase, (char *)&outdata, 4); 240 memcpy(membase, &outdata, 4);
241 /* Now compare them */ 241 /* Now compare them */
242 if (memcmp((char *)&outdata, (char *)membase, 4) == 0) 242 if (memcmp((char *)&outdata, (char *)membase, 4) == 0)
243 return ACCESS_32; 243 return ACCESS_32;
244 /* Write 16 bit output */ 244 /* Write 16 bit output */
245 word_memcpy_tocard((char *)membase, (char *)&outdata, 4); 245 word_memcpy_tocard(membase, &outdata, 4);
246 /* Now read it back */ 246 /* Now read it back */
247 word_memcpy_fromcard((char *)&indata, (char *)membase, 4); 247 word_memcpy_fromcard(&indata, membase, 4);
248 if (outdata == indata) 248 if (outdata == indata)
249 return ACCESS_16; 249 return ACCESS_16;
250 return ACCESS_UNKNOWN; 250 return ACCESS_UNKNOWN;
@@ -759,7 +759,7 @@ static void dayna_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr
759{ 759{
760 unsigned long hdr_start = (ring_page - WD_START_PG)<<8; 760 unsigned long hdr_start = (ring_page - WD_START_PG)<<8;
761 761
762 dayna_memcpy_fromcard(dev, (void *)hdr, hdr_start, 4); 762 dayna_memcpy_fromcard(dev, hdr, hdr_start, 4);
763 /* Fix endianness */ 763 /* Fix endianness */
764 hdr->count=(hdr->count&0xFF)<<8|(hdr->count>>8); 764 hdr->count=(hdr->count&0xFF)<<8|(hdr->count>>8);
765} 765}
@@ -801,7 +801,7 @@ static void slow_sane_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr
801 int ring_page) 801 int ring_page)
802{ 802{
803 unsigned long hdr_start = (ring_page - WD_START_PG)<<8; 803 unsigned long hdr_start = (ring_page - WD_START_PG)<<8;
804 word_memcpy_fromcard((void *)hdr, (char *)dev->mem_start+hdr_start, 4); 804 word_memcpy_fromcard(hdr, (char *)dev->mem_start + hdr_start, 4);
805 /* Register endianism - fix here rather than 8390.c */ 805 /* Register endianism - fix here rather than 8390.c */
806 hdr->count = (hdr->count&0xFF)<<8|(hdr->count>>8); 806 hdr->count = (hdr->count&0xFF)<<8|(hdr->count>>8);
807} 807}
@@ -816,16 +816,17 @@ static void slow_sane_block_input(struct net_device *dev, int count, struct sk_b
816 { 816 {
817 /* We must wrap the input move. */ 817 /* We must wrap the input move. */
818 int semi_count = ei_status.rmem_end - xfer_start; 818 int semi_count = ei_status.rmem_end - xfer_start;
819 word_memcpy_fromcard(skb->data, (char *)dev->mem_start + 819 word_memcpy_fromcard(skb->data,
820 xfer_base, semi_count); 820 (char *)dev->mem_start + xfer_base,
821 semi_count);
821 count -= semi_count; 822 count -= semi_count;
822 word_memcpy_fromcard(skb->data + semi_count, 823 word_memcpy_fromcard(skb->data + semi_count,
823 (char *)ei_status.rmem_start, count); 824 (char *)ei_status.rmem_start, count);
824 } 825 }
825 else 826 else
826 { 827 {
827 word_memcpy_fromcard(skb->data, (char *)dev->mem_start + 828 word_memcpy_fromcard(skb->data,
828 xfer_base, count); 829 (char *)dev->mem_start + xfer_base, count);
829 } 830 }
830} 831}
831 832