Commit ece49153b601d95bcebd45a6394e370972f0b0a0
Committed by
David S. Miller
1 parent
5f54cebb13
Exists in
master
and in
39 other branches
drivers/net: Remove unnecessary casts of netdev_priv
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 6 changed files with 34 additions and 34 deletions Side-by-side Diff
drivers/net/ax88796.c
... | ... | @@ -325,7 +325,7 @@ |
325 | 325 | static void |
326 | 326 | ax_mii_ei_outbits(struct net_device *dev, unsigned int bits, int len) |
327 | 327 | { |
328 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
328 | + struct ei_device *ei_local = netdev_priv(dev); | |
329 | 329 | void __iomem *memr_addr = (void __iomem *)dev->base_addr + AX_MEMR; |
330 | 330 | unsigned int memr; |
331 | 331 | |
... | ... | @@ -364,7 +364,7 @@ |
364 | 364 | static unsigned int |
365 | 365 | ax_phy_ei_inbits(struct net_device *dev, int no) |
366 | 366 | { |
367 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
367 | + struct ei_device *ei_local = netdev_priv(dev); | |
368 | 368 | void __iomem *memr_addr = (void __iomem *)dev->base_addr + AX_MEMR; |
369 | 369 | unsigned int memr; |
370 | 370 | unsigned int result = 0; |
... | ... | @@ -412,7 +412,7 @@ |
412 | 412 | static int |
413 | 413 | ax_phy_read(struct net_device *dev, int phy_addr, int reg) |
414 | 414 | { |
415 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
415 | + struct ei_device *ei_local = netdev_priv(dev); | |
416 | 416 | unsigned long flags; |
417 | 417 | unsigned int result; |
418 | 418 | |
... | ... | @@ -435,7 +435,7 @@ |
435 | 435 | static void |
436 | 436 | ax_phy_write(struct net_device *dev, int phy_addr, int reg, int value) |
437 | 437 | { |
438 | - struct ei_device *ei = (struct ei_device *) netdev_priv(dev); | |
438 | + struct ei_device *ei = netdev_priv(dev); | |
439 | 439 | struct ax_device *ax = to_ax_dev(dev); |
440 | 440 | unsigned long flags; |
441 | 441 |
drivers/net/dm9000.c
... | ... | @@ -1675,7 +1675,7 @@ |
1675 | 1675 | platform_set_drvdata(pdev, NULL); |
1676 | 1676 | |
1677 | 1677 | unregister_netdev(ndev); |
1678 | - dm9000_release_board(pdev, (board_info_t *) netdev_priv(ndev)); | |
1678 | + dm9000_release_board(pdev, netdev_priv(ndev)); | |
1679 | 1679 | free_netdev(ndev); /* free device structure */ |
1680 | 1680 | |
1681 | 1681 | dev_dbg(&pdev->dev, "released and freed device\n"); |
drivers/net/iseries_veth.c
... | ... | @@ -1605,7 +1605,7 @@ |
1605 | 1605 | } |
1606 | 1606 | veth_dev[i] = dev; |
1607 | 1607 | |
1608 | - port = (struct veth_port*)netdev_priv(dev); | |
1608 | + port = netdev_priv(dev); | |
1609 | 1609 | |
1610 | 1610 | /* Start the state machine on each connection on this vlan. If we're |
1611 | 1611 | * the first dev to do so this will commence link negotiation */ |
drivers/net/lib8390.c
... | ... | @@ -203,7 +203,7 @@ |
203 | 203 | static int __ei_open(struct net_device *dev) |
204 | 204 | { |
205 | 205 | unsigned long flags; |
206 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
206 | + struct ei_device *ei_local = netdev_priv(dev); | |
207 | 207 | |
208 | 208 | if (dev->watchdog_timeo <= 0) |
209 | 209 | dev->watchdog_timeo = TX_TIMEOUT; |
... | ... | @@ -231,7 +231,7 @@ |
231 | 231 | */ |
232 | 232 | static int __ei_close(struct net_device *dev) |
233 | 233 | { |
234 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
234 | + struct ei_device *ei_local = netdev_priv(dev); | |
235 | 235 | unsigned long flags; |
236 | 236 | |
237 | 237 | /* |
... | ... | @@ -256,7 +256,7 @@ |
256 | 256 | static void __ei_tx_timeout(struct net_device *dev) |
257 | 257 | { |
258 | 258 | unsigned long e8390_base = dev->base_addr; |
259 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
259 | + struct ei_device *ei_local = netdev_priv(dev); | |
260 | 260 | int txsr, isr, tickssofar = jiffies - dev_trans_start(dev); |
261 | 261 | unsigned long flags; |
262 | 262 | |
... | ... | @@ -303,7 +303,7 @@ |
303 | 303 | struct net_device *dev) |
304 | 304 | { |
305 | 305 | unsigned long e8390_base = dev->base_addr; |
306 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
306 | + struct ei_device *ei_local = netdev_priv(dev); | |
307 | 307 | int send_length = skb->len, output_page; |
308 | 308 | unsigned long flags; |
309 | 309 | char buf[ETH_ZLEN]; |
... | ... | @@ -592,7 +592,7 @@ |
592 | 592 | static void ei_tx_intr(struct net_device *dev) |
593 | 593 | { |
594 | 594 | unsigned long e8390_base = dev->base_addr; |
595 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
595 | + struct ei_device *ei_local = netdev_priv(dev); | |
596 | 596 | int status = ei_inb(e8390_base + EN0_TSR); |
597 | 597 | |
598 | 598 | ei_outb_p(ENISR_TX, e8390_base + EN0_ISR); /* Ack intr. */ |
... | ... | @@ -675,7 +675,7 @@ |
675 | 675 | static void ei_receive(struct net_device *dev) |
676 | 676 | { |
677 | 677 | unsigned long e8390_base = dev->base_addr; |
678 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
678 | + struct ei_device *ei_local = netdev_priv(dev); | |
679 | 679 | unsigned char rxing_page, this_frame, next_frame; |
680 | 680 | unsigned short current_offset; |
681 | 681 | int rx_pkt_count = 0; |
... | ... | @@ -879,7 +879,7 @@ |
879 | 879 | static struct net_device_stats *__ei_get_stats(struct net_device *dev) |
880 | 880 | { |
881 | 881 | unsigned long ioaddr = dev->base_addr; |
882 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
882 | + struct ei_device *ei_local = netdev_priv(dev); | |
883 | 883 | unsigned long flags; |
884 | 884 | |
885 | 885 | /* If the card is stopped, just return the present stats. */ |
... | ... | @@ -927,7 +927,7 @@ |
927 | 927 | { |
928 | 928 | unsigned long e8390_base = dev->base_addr; |
929 | 929 | int i; |
930 | - struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev); | |
930 | + struct ei_device *ei_local = netdev_priv(dev); | |
931 | 931 | |
932 | 932 | if (!(dev->flags&(IFF_PROMISC|IFF_ALLMULTI))) |
933 | 933 | { |
... | ... | @@ -981,7 +981,7 @@ |
981 | 981 | static void __ei_set_multicast_list(struct net_device *dev) |
982 | 982 | { |
983 | 983 | unsigned long flags; |
984 | - struct ei_device *ei_local = (struct ei_device*)netdev_priv(dev); | |
984 | + struct ei_device *ei_local = netdev_priv(dev); | |
985 | 985 | |
986 | 986 | spin_lock_irqsave(&ei_local->page_lock, flags); |
987 | 987 | do_set_multicast_list(dev); |
... | ... | @@ -998,7 +998,7 @@ |
998 | 998 | |
999 | 999 | static void ethdev_setup(struct net_device *dev) |
1000 | 1000 | { |
1001 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
1001 | + struct ei_device *ei_local = netdev_priv(dev); | |
1002 | 1002 | if (ei_debug > 1) |
1003 | 1003 | printk(version); |
1004 | 1004 | |
... | ... | @@ -1036,7 +1036,7 @@ |
1036 | 1036 | static void __NS8390_init(struct net_device *dev, int startp) |
1037 | 1037 | { |
1038 | 1038 | unsigned long e8390_base = dev->base_addr; |
1039 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
1039 | + struct ei_device *ei_local = netdev_priv(dev); | |
1040 | 1040 | int i; |
1041 | 1041 | int endcfg = ei_local->word16 |
1042 | 1042 | ? (0x48 | ENDCFG_WTS | (ei_local->bigendian ? ENDCFG_BOS : 0)) |
... | ... | @@ -1099,7 +1099,7 @@ |
1099 | 1099 | int start_page) |
1100 | 1100 | { |
1101 | 1101 | unsigned long e8390_base = dev->base_addr; |
1102 | - struct ei_device *ei_local __attribute((unused)) = (struct ei_device *) netdev_priv(dev); | |
1102 | + struct ei_device *ei_local __attribute((unused)) = netdev_priv(dev); | |
1103 | 1103 | |
1104 | 1104 | ei_outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD); |
1105 | 1105 |
drivers/net/ne-h8300.c
... | ... | @@ -86,7 +86,7 @@ |
86 | 86 | |
87 | 87 | static int __init init_reg_offset(struct net_device *dev,unsigned long base_addr) |
88 | 88 | { |
89 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
89 | + struct ei_device *ei_local = netdev_priv(dev); | |
90 | 90 | int i; |
91 | 91 | unsigned char bus_width; |
92 | 92 | |
... | ... | @@ -218,7 +218,7 @@ |
218 | 218 | int start_page, stop_page; |
219 | 219 | int reg0, ret; |
220 | 220 | static unsigned version_printed; |
221 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
221 | + struct ei_device *ei_local = netdev_priv(dev); | |
222 | 222 | unsigned char bus_width; |
223 | 223 | |
224 | 224 | if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME)) |
... | ... | @@ -371,7 +371,7 @@ |
371 | 371 | static void ne_reset_8390(struct net_device *dev) |
372 | 372 | { |
373 | 373 | unsigned long reset_start_time = jiffies; |
374 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
374 | + struct ei_device *ei_local = netdev_priv(dev); | |
375 | 375 | |
376 | 376 | if (ei_debug > 1) |
377 | 377 | printk(KERN_DEBUG "resetting the 8390 t=%ld...", jiffies); |
... | ... | @@ -397,7 +397,7 @@ |
397 | 397 | |
398 | 398 | static void ne_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page) |
399 | 399 | { |
400 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
400 | + struct ei_device *ei_local = netdev_priv(dev); | |
401 | 401 | /* This *shouldn't* happen. If it does, it's the last thing you'll see */ |
402 | 402 | |
403 | 403 | if (ei_status.dmaing) |
... | ... | @@ -437,7 +437,7 @@ |
437 | 437 | |
438 | 438 | static void ne_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset) |
439 | 439 | { |
440 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
440 | + struct ei_device *ei_local = netdev_priv(dev); | |
441 | 441 | #ifdef NE_SANITY_CHECK |
442 | 442 | int xfer_count = count; |
443 | 443 | #endif |
... | ... | @@ -507,7 +507,7 @@ |
507 | 507 | static void ne_block_output(struct net_device *dev, int count, |
508 | 508 | const unsigned char *buf, const int start_page) |
509 | 509 | { |
510 | - struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); | |
510 | + struct ei_device *ei_local = netdev_priv(dev); | |
511 | 511 | unsigned long dma_start; |
512 | 512 | #ifdef NE_SANITY_CHECK |
513 | 513 | int retries = 0; |
drivers/net/xilinx_emaclite.c
... | ... | @@ -515,7 +515,7 @@ |
515 | 515 | */ |
516 | 516 | static int xemaclite_set_mac_address(struct net_device *dev, void *address) |
517 | 517 | { |
518 | - struct net_local *lp = (struct net_local *) netdev_priv(dev); | |
518 | + struct net_local *lp = netdev_priv(dev); | |
519 | 519 | struct sockaddr *addr = address; |
520 | 520 | |
521 | 521 | if (netif_running(dev)) |
... | ... | @@ -534,7 +534,7 @@ |
534 | 534 | */ |
535 | 535 | static void xemaclite_tx_timeout(struct net_device *dev) |
536 | 536 | { |
537 | - struct net_local *lp = (struct net_local *) netdev_priv(dev); | |
537 | + struct net_local *lp = netdev_priv(dev); | |
538 | 538 | unsigned long flags; |
539 | 539 | |
540 | 540 | dev_err(&lp->ndev->dev, "Exceeded transmit timeout of %lu ms\n", |
... | ... | @@ -578,7 +578,7 @@ |
578 | 578 | */ |
579 | 579 | static void xemaclite_tx_handler(struct net_device *dev) |
580 | 580 | { |
581 | - struct net_local *lp = (struct net_local *) netdev_priv(dev); | |
581 | + struct net_local *lp = netdev_priv(dev); | |
582 | 582 | |
583 | 583 | dev->stats.tx_packets++; |
584 | 584 | if (lp->deferred_skb) { |
... | ... | @@ -605,7 +605,7 @@ |
605 | 605 | */ |
606 | 606 | static void xemaclite_rx_handler(struct net_device *dev) |
607 | 607 | { |
608 | - struct net_local *lp = (struct net_local *) netdev_priv(dev); | |
608 | + struct net_local *lp = netdev_priv(dev); | |
609 | 609 | struct sk_buff *skb; |
610 | 610 | unsigned int align; |
611 | 611 | u32 len; |
... | ... | @@ -661,7 +661,7 @@ |
661 | 661 | { |
662 | 662 | bool tx_complete = 0; |
663 | 663 | struct net_device *dev = dev_id; |
664 | - struct net_local *lp = (struct net_local *) netdev_priv(dev); | |
664 | + struct net_local *lp = netdev_priv(dev); | |
665 | 665 | void __iomem *base_addr = lp->base_addr; |
666 | 666 | u32 tx_status; |
667 | 667 | |
... | ... | @@ -918,7 +918,7 @@ |
918 | 918 | */ |
919 | 919 | static int xemaclite_open(struct net_device *dev) |
920 | 920 | { |
921 | - struct net_local *lp = (struct net_local *) netdev_priv(dev); | |
921 | + struct net_local *lp = netdev_priv(dev); | |
922 | 922 | int retval; |
923 | 923 | |
924 | 924 | /* Just to be safe, stop the device first */ |
... | ... | @@ -987,7 +987,7 @@ |
987 | 987 | */ |
988 | 988 | static int xemaclite_close(struct net_device *dev) |
989 | 989 | { |
990 | - struct net_local *lp = (struct net_local *) netdev_priv(dev); | |
990 | + struct net_local *lp = netdev_priv(dev); | |
991 | 991 | |
992 | 992 | netif_stop_queue(dev); |
993 | 993 | xemaclite_disable_interrupts(lp); |
... | ... | @@ -1031,7 +1031,7 @@ |
1031 | 1031 | */ |
1032 | 1032 | static int xemaclite_send(struct sk_buff *orig_skb, struct net_device *dev) |
1033 | 1033 | { |
1034 | - struct net_local *lp = (struct net_local *) netdev_priv(dev); | |
1034 | + struct net_local *lp = netdev_priv(dev); | |
1035 | 1035 | struct sk_buff *new_skb; |
1036 | 1036 | unsigned int len; |
1037 | 1037 | unsigned long flags; |
... | ... | @@ -1068,7 +1068,7 @@ |
1068 | 1068 | static void xemaclite_remove_ndev(struct net_device *ndev) |
1069 | 1069 | { |
1070 | 1070 | if (ndev) { |
1071 | - struct net_local *lp = (struct net_local *) netdev_priv(ndev); | |
1071 | + struct net_local *lp = netdev_priv(ndev); | |
1072 | 1072 | |
1073 | 1073 | if (lp->base_addr) |
1074 | 1074 | iounmap((void __iomem __force *) (lp->base_addr)); |
... | ... | @@ -1245,7 +1245,7 @@ |
1245 | 1245 | struct device *dev = &of_dev->dev; |
1246 | 1246 | struct net_device *ndev = dev_get_drvdata(dev); |
1247 | 1247 | |
1248 | - struct net_local *lp = (struct net_local *) netdev_priv(ndev); | |
1248 | + struct net_local *lp = netdev_priv(ndev); | |
1249 | 1249 | |
1250 | 1250 | /* Un-register the mii_bus, if configured */ |
1251 | 1251 | if (lp->has_mdio) { |