aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/skfp/skfddi.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-09-23 01:40:09 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-26 21:34:29 -0400
commit807540baae406c84dcb9c1c8ef07a56d2d2ae84a (patch)
treeccd5c2cb57710dd6b73cf8df11eedf67abc14ae4 /drivers/net/skfp/skfddi.c
parentcb4dfe562cac6fcb544df752e40c1d78000d0712 (diff)
drivers/net: return operator cleanup
Change "return (EXPR);" to "return EXPR;" return is not a function, parentheses are not required. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/skfp/skfddi.c')
-rw-r--r--drivers/net/skfp/skfddi.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
index 8a12bd9d28ba..ba2e8339fe90 100644
--- a/drivers/net/skfp/skfddi.c
+++ b/drivers/net/skfp/skfddi.c
@@ -440,7 +440,7 @@ static int skfp_driver_init(struct net_device *dev)
440 440
441 smt_reset_defaults(smc, 0); 441 smt_reset_defaults(smc, 0);
442 442
443 return (0); 443 return 0;
444 444
445fail: 445fail:
446 if (bp->SharedMemAddr) { 446 if (bp->SharedMemAddr) {
@@ -516,7 +516,7 @@ static int skfp_open(struct net_device *dev)
516 mac_drv_rx_mode(smc, RX_DISABLE_PROMISC); 516 mac_drv_rx_mode(smc, RX_DISABLE_PROMISC);
517 517
518 netif_start_queue(dev); 518 netif_start_queue(dev);
519 return (0); 519 return 0;
520} // skfp_open 520} // skfp_open
521 521
522 522
@@ -565,7 +565,7 @@ static int skfp_close(struct net_device *dev)
565 skb_queue_purge(&bp->SendSkbQueue); 565 skb_queue_purge(&bp->SendSkbQueue);
566 bp->QueueSkb = MAX_TX_QUEUE_LEN; 566 bp->QueueSkb = MAX_TX_QUEUE_LEN;
567 567
568 return (0); 568 return 0;
569} // skfp_close 569} // skfp_close
570 570
571 571
@@ -794,7 +794,7 @@ static struct net_device_stats *skfp_ctl_get_stats(struct net_device *dev)
794 bp->stats.port_lem_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[1].ls; 794 bp->stats.port_lem_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[1].ls;
795 795
796#endif 796#endif
797 return ((struct net_device_stats *) &bp->os.MacStat); 797 return (struct net_device_stats *)&bp->os.MacStat;
798} // ctl_get_stat 798} // ctl_get_stat
799 799
800 800
@@ -932,7 +932,7 @@ static int skfp_ctl_set_mac_address(struct net_device *dev, void *addr)
932 ResetAdapter(smc); 932 ResetAdapter(smc);
933 spin_unlock_irqrestore(&bp->DriverLock, Flags); 933 spin_unlock_irqrestore(&bp->DriverLock, Flags);
934 934
935 return (0); /* always return zero */ 935 return 0; /* always return zero */
936} // skfp_ctl_set_mac_address 936} // skfp_ctl_set_mac_address
937 937
938 938
@@ -1313,7 +1313,7 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size)
1313 1313
1314 if ((smc->os.SharedMemHeap + size) > smc->os.SharedMemSize) { 1314 if ((smc->os.SharedMemHeap + size) > smc->os.SharedMemSize) {
1315 printk("Unexpected SMT memory size requested: %d\n", size); 1315 printk("Unexpected SMT memory size requested: %d\n", size);
1316 return (NULL); 1316 return NULL;
1317 } 1317 }
1318 smc->os.SharedMemHeap += size; // Move heap pointer. 1318 smc->os.SharedMemHeap += size; // Move heap pointer.
1319 1319
@@ -1322,7 +1322,7 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size)
1322 pr_debug("bus addr: %lx\n", (ulong) 1322 pr_debug("bus addr: %lx\n", (ulong)
1323 (smc->os.SharedMemDMA + 1323 (smc->os.SharedMemDMA +
1324 ((char *) virt - (char *)smc->os.SharedMemAddr))); 1324 ((char *) virt - (char *)smc->os.SharedMemAddr)));
1325 return (virt); 1325 return virt;
1326} // mac_drv_get_space 1326} // mac_drv_get_space
1327 1327
1328 1328
@@ -1363,9 +1363,9 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size)
1363 1363
1364 if (!mac_drv_get_space(smc, size)) { 1364 if (!mac_drv_get_space(smc, size)) {
1365 printk("fddi: Unable to align descriptor memory.\n"); 1365 printk("fddi: Unable to align descriptor memory.\n");
1366 return (NULL); 1366 return NULL;
1367 } 1367 }
1368 return (virt + size); 1368 return virt + size;
1369} // mac_drv_get_desc_mem 1369} // mac_drv_get_desc_mem
1370 1370
1371 1371
@@ -1384,8 +1384,8 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size)
1384 ************************/ 1384 ************************/
1385unsigned long mac_drv_virt2phys(struct s_smc *smc, void *virt) 1385unsigned long mac_drv_virt2phys(struct s_smc *smc, void *virt)
1386{ 1386{
1387 return (smc->os.SharedMemDMA + 1387 return smc->os.SharedMemDMA +
1388 ((char *) virt - (char *)smc->os.SharedMemAddr)); 1388 ((char *) virt - (char *)smc->os.SharedMemAddr);
1389} // mac_drv_virt2phys 1389} // mac_drv_virt2phys
1390 1390
1391 1391
@@ -1419,8 +1419,8 @@ unsigned long mac_drv_virt2phys(struct s_smc *smc, void *virt)
1419 ************************/ 1419 ************************/
1420u_long dma_master(struct s_smc * smc, void *virt, int len, int flag) 1420u_long dma_master(struct s_smc * smc, void *virt, int len, int flag)
1421{ 1421{
1422 return (smc->os.SharedMemDMA + 1422 return smc->os.SharedMemDMA +
1423 ((char *) virt - (char *)smc->os.SharedMemAddr)); 1423 ((char *) virt - (char *)smc->os.SharedMemAddr);
1424} // dma_master 1424} // dma_master
1425 1425
1426 1426
@@ -1904,12 +1904,12 @@ int mac_drv_rx_init(struct s_smc *smc, int len, int fc,
1904 pr_debug("fddi: Discard invalid local SMT frame\n"); 1904 pr_debug("fddi: Discard invalid local SMT frame\n");
1905 pr_debug(" len=%d, la_len=%d, (ULONG) look_ahead=%08lXh.\n", 1905 pr_debug(" len=%d, la_len=%d, (ULONG) look_ahead=%08lXh.\n",
1906 len, la_len, (unsigned long) look_ahead); 1906 len, la_len, (unsigned long) look_ahead);
1907 return (0); 1907 return 0;
1908 } 1908 }
1909 skb = alloc_skb(len + 3, GFP_ATOMIC); 1909 skb = alloc_skb(len + 3, GFP_ATOMIC);
1910 if (!skb) { 1910 if (!skb) {
1911 pr_debug("fddi: Local SMT: skb memory exhausted.\n"); 1911 pr_debug("fddi: Local SMT: skb memory exhausted.\n");
1912 return (0); 1912 return 0;
1913 } 1913 }
1914 skb_reserve(skb, 3); 1914 skb_reserve(skb, 3);
1915 skb_put(skb, len); 1915 skb_put(skb, len);
@@ -1919,7 +1919,7 @@ int mac_drv_rx_init(struct s_smc *smc, int len, int fc,
1919 skb->protocol = fddi_type_trans(skb, smc->os.dev); 1919 skb->protocol = fddi_type_trans(skb, smc->os.dev);
1920 netif_rx(skb); 1920 netif_rx(skb);
1921 1921
1922 return (0); 1922 return 0;
1923} // mac_drv_rx_init 1923} // mac_drv_rx_init
1924 1924
1925 1925