diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-09-23 05:40:09 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-26 18:34:29 -0700 |
commit | 807540baae406c84dcb9c1c8ef07a56d2d2ae84a (patch) | |
tree | ccd5c2cb57710dd6b73cf8df11eedf67abc14ae4 /drivers/net/tokenring | |
parent | cb4dfe562cac6fcb544df752e40c1d78000d0712 (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/tokenring')
-rw-r--r-- | drivers/net/tokenring/proteon.c | 2 | ||||
-rw-r--r-- | drivers/net/tokenring/smctr.c | 500 | ||||
-rw-r--r-- | drivers/net/tokenring/tms380tr.c | 58 |
3 files changed, 281 insertions, 279 deletions
diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c index 16e8783ee9c..8d362e64a40 100644 --- a/drivers/net/tokenring/proteon.c +++ b/drivers/net/tokenring/proteon.c @@ -110,7 +110,7 @@ static int __init proteon_probe1(struct net_device *dev, int ioaddr) } dev->base_addr = ioaddr; - return (0); + return 0; nodev: release_region(ioaddr, PROTEON_IO_EXTENT); return -ENODEV; diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index 0929fff5982..63db5a6762a 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c @@ -435,7 +435,7 @@ static int smctr_alloc_shared_memory(struct net_device *dev) RX_DATA_BUFFER_SIZE * tp->num_rx_bdbs[NON_MAC_QUEUE]); tp->rx_buff_end[NON_MAC_QUEUE] = (__u16 *)smctr_malloc(dev, 0); - return (0); + return 0; } /* Enter Bypass state. */ @@ -448,7 +448,7 @@ static int smctr_bypass_state(struct net_device *dev) err = smctr_setup_single_cmd(dev, ACB_CMD_CHANGE_JOIN_STATE, JS_BYPASS_STATE); - return (err); + return err; } static int smctr_checksum_firmware(struct net_device *dev) @@ -471,9 +471,9 @@ static int smctr_checksum_firmware(struct net_device *dev) smctr_disable_adapter_ctrl_store(dev); if(checksum) - return (checksum); + return checksum; - return (0); + return 0; } static int __init smctr_chk_mca(struct net_device *dev) @@ -485,7 +485,7 @@ static int __init smctr_chk_mca(struct net_device *dev) current_slot = mca_find_unused_adapter(smctr_posid, 0); if(current_slot == MCA_NOTFOUND) - return (-ENODEV); + return -ENODEV; mca_set_adapter_name(current_slot, smctr_name); mca_mark_as_used(current_slot); @@ -622,9 +622,9 @@ static int __init smctr_chk_mca(struct net_device *dev) break; } - return (0); + return 0; #else - return (-1); + return -1; #endif /* CONFIG_MCA_LEGACY */ } @@ -677,18 +677,18 @@ static int smctr_chg_rx_mask(struct net_device *dev) if((err = smctr_issue_write_word_cmd(dev, RW_CONFIG_REGISTER_0, &tp->config_word0))) { - return (err); + return err; } if((err = smctr_issue_write_word_cmd(dev, RW_CONFIG_REGISTER_1, &tp->config_word1))) { - return (err); + return err; } smctr_disable_16bit(dev); - return (0); + return 0; } static int smctr_clear_int(struct net_device *dev) @@ -697,7 +697,7 @@ static int smctr_clear_int(struct net_device *dev) outb((tp->trc_mask | CSR_CLRTINT), dev->base_addr + CSR); - return (0); + return 0; } static int smctr_clear_trc_reset(int ioaddr) @@ -707,7 +707,7 @@ static int smctr_clear_trc_reset(int ioaddr) r = inb(ioaddr + MSR); outb(~MSR_RST & r, ioaddr + MSR); - return (0); + return 0; } /* @@ -725,7 +725,7 @@ static int smctr_close(struct net_device *dev) /* Check to see if adapter is already in a closed state. */ if(tp->status != OPEN) - return (0); + return 0; smctr_enable_16bit(dev); smctr_set_page(dev, (__u8 *)tp->ram_access); @@ -733,7 +733,7 @@ static int smctr_close(struct net_device *dev) if((err = smctr_issue_remove_cmd(dev))) { smctr_disable_16bit(dev); - return (err); + return err; } for(;;) @@ -746,7 +746,7 @@ static int smctr_close(struct net_device *dev) } - return (0); + return 0; } static int smctr_decode_firmware(struct net_device *dev, @@ -807,12 +807,12 @@ static int smctr_decode_firmware(struct net_device *dev, if(buff) *(mem++) = SWAP_BYTES(buff); - return (0); + return 0; } static int smctr_disable_16bit(struct net_device *dev) { - return (0); + return 0; } /* @@ -832,7 +832,7 @@ static int smctr_disable_adapter_ctrl_store(struct net_device *dev) tp->trc_mask |= CSR_WCSS; outb(tp->trc_mask, ioaddr + CSR); - return (0); + return 0; } static int smctr_disable_bic_int(struct net_device *dev) @@ -844,7 +844,7 @@ static int smctr_disable_bic_int(struct net_device *dev) | CSR_MSKTINT | CSR_WCSS; outb(tp->trc_mask, ioaddr + CSR); - return (0); + return 0; } static int smctr_enable_16bit(struct net_device *dev) @@ -858,7 +858,7 @@ static int smctr_enable_16bit(struct net_device *dev) outb((r | LAAR_MEM16ENB), dev->base_addr + LAAR); } - return (0); + return 0; } /* @@ -881,7 +881,7 @@ static int smctr_enable_adapter_ctrl_store(struct net_device *dev) tp->trc_mask &= ~CSR_WCSS; outb(tp->trc_mask, ioaddr + CSR); - return (0); + return 0; } static int smctr_enable_adapter_ram(struct net_device *dev) @@ -895,7 +895,7 @@ static int smctr_enable_adapter_ram(struct net_device *dev) r = inb(ioaddr + MSR); outb(MSR_MEMB | r, ioaddr + MSR); - return (0); + return 0; } static int smctr_enable_bic_int(struct net_device *dev) @@ -921,7 +921,7 @@ static int smctr_enable_bic_int(struct net_device *dev) break; } - return (0); + return 0; } static int __init smctr_chk_isa(struct net_device *dev) @@ -1145,7 +1145,7 @@ static int __init smctr_chk_isa(struct net_device *dev) */ } - return (0); + return 0; out2: release_region(ioaddr, SMCTR_IO_EXTENT); @@ -1199,7 +1199,7 @@ static int __init smctr_get_boardid(struct net_device *dev, int mca) * return; */ if(IdByte & 0xF8) - return (-1); + return -1; r1 = inb(ioaddr + BID_REG_1); r1 &= BID_ICR_MASK; @@ -1250,21 +1250,21 @@ static int __init smctr_get_boardid(struct net_device *dev, int mca) while(r1 & BID_RECALL_DONE_MASK) r1 = inb(ioaddr + BID_REG_1); - return (BoardIdMask); + return BoardIdMask; } static int smctr_get_group_address(struct net_device *dev) { smctr_issue_read_word_cmd(dev, RW_INDIVIDUAL_GROUP_ADDR); - return(smctr_wait_cmd(dev)); + return smctr_wait_cmd(dev); } static int smctr_get_functional_address(struct net_device *dev) { smctr_issue_read_word_cmd(dev, RW_FUNCTIONAL_ADDR); - return(smctr_wait_cmd(dev)); + return smctr_wait_cmd(dev); } /* Calculate number of Non-MAC receive BDB's and data buffers. @@ -1346,14 +1346,14 @@ static unsigned int smctr_get_num_rx_bdbs(struct net_device *dev) */ mem_used += 0x100; - return((0xffff - mem_used) / (RX_DATA_BUFFER_SIZE + sizeof(BDBlock))); + return (0xffff - mem_used) / (RX_DATA_BUFFER_SIZE + sizeof(BDBlock)); } static int smctr_get_physical_drop_number(struct net_device *dev) { smctr_issue_read_word_cmd(dev, RW_PHYSICAL_DROP_NUMBER); - return(smctr_wait_cmd(dev)); + return smctr_wait_cmd(dev); } static __u8 * smctr_get_rx_pointer(struct net_device *dev, short queue) @@ -1366,14 +1366,14 @@ static __u8 * smctr_get_rx_pointer(struct net_device *dev, short queue) tp->rx_fcb_curr[queue]->bdb_ptr = bdb; - return ((__u8 *)bdb->data_block_ptr); + return (__u8 *)bdb->data_block_ptr; } static int smctr_get_station_id(struct net_device *dev) { smctr_issue_read_word_cmd(dev, RW_INDIVIDUAL_MAC_ADDRESS); - return(smctr_wait_cmd(dev)); + return smctr_wait_cmd(dev); } /* @@ -1384,7 +1384,7 @@ static struct net_device_stats *smctr_get_stats(struct net_device *dev) { struct net_local *tp = netdev_priv(dev); - return ((struct net_device_stats *)&tp->MacStat); + return (struct net_device_stats *)&tp->MacStat; } static FCBlock *smctr_get_tx_fcb(struct net_device *dev, __u16 queue, @@ -1401,14 +1401,14 @@ static FCBlock *smctr_get_tx_fcb(struct net_device *dev, __u16 queue, /* check if there is enough FCB blocks */ if(tp->num_tx_fcbs_used[queue] >= tp->num_tx_fcbs[queue]) - return ((FCBlock *)(-1L)); + return (FCBlock *)(-1L); /* round off the input pkt size to the nearest even number */ alloc_size = (bytes_count + 1) & 0xfffe; /* check if enough mem */ if((tp->tx_buff_used[queue] + alloc_size) > tp->tx_buff_size[queue]) - return ((FCBlock *)(-1L)); + return (FCBlock *)(-1L); /* check if past the end ; * if exactly enough mem to end of ring, alloc from front. @@ -1425,7 +1425,7 @@ static FCBlock *smctr_get_tx_fcb(struct net_device *dev, __u16 queue, if((tp->tx_buff_used[queue] + alloc_size) > tp->tx_buff_size[queue]) { - return ((FCBlock *)(-1L)); + return (FCBlock *)(-1L); } /* ring wrap */ @@ -1448,14 +1448,14 @@ static FCBlock *smctr_get_tx_fcb(struct net_device *dev, __u16 queue, pFCB = tp->tx_fcb_curr[queue]; tp->tx_fcb_curr[queue] = tp->tx_fcb_curr[queue]->next_ptr; - return (pFCB); + return pFCB; } static int smctr_get_upstream_neighbor_addr(struct net_device *dev) { smctr_issue_read_word_cmd(dev, RW_UPSTREAM_NEIGHBOR_ADDRESS); - return(smctr_wait_cmd(dev)); + return smctr_wait_cmd(dev); } static int smctr_hardware_send_packet(struct net_device *dev, @@ -1469,21 +1469,22 @@ static int smctr_hardware_send_packet(struct net_device *dev, printk(KERN_DEBUG"%s: smctr_hardware_send_packet\n", dev->name); if(tp->status != OPEN) - return (-1); + return -1; if(tp->monitor_state_ready != 1) - return (-1); + return -1; for(;;) { /* Send first buffer from queue */ skb = skb_dequeue(&tp->SendSkbQueue); if(skb == NULL) - return (-1); + return -1; tp->QueueSkb++; - if(skb->len < SMC_HEADER_SIZE || skb->len > tp->max_packet_size) return (-1); + if(skb->len < SMC_HEADER_SIZE || skb->len > tp->max_packet_size) + return -1; smctr_enable_16bit(dev); smctr_set_page(dev, (__u8 *)tp->ram_access); @@ -1492,7 +1493,7 @@ static int smctr_hardware_send_packet(struct net_device *dev, == (FCBlock *)(-1L)) { smctr_disable_16bit(dev); - return (-1); + return -1; } smctr_tx_move_frame(dev, skb, @@ -1508,7 +1509,7 @@ static int smctr_hardware_send_packet(struct net_device *dev, smctr_disable_16bit(dev); } - return (0); + return 0; } static int smctr_init_acbs(struct net_device *dev) @@ -1552,7 +1553,7 @@ static int smctr_init_acbs(struct net_device *dev) tp->acb_curr = tp->acb_head->next_ptr; tp->num_acbs_used = 0; - return (0); + return 0; } static int smctr_init_adapter(struct net_device *dev) @@ -1590,13 +1591,14 @@ static int smctr_init_adapter(struct net_device *dev) if(smctr_checksum_firmware(dev)) { - printk(KERN_ERR "%s: Previously loaded firmware is missing\n",dev->name); return (-ENOENT); + printk(KERN_ERR "%s: Previously loaded firmware is missing\n",dev->name); + return -ENOENT; } if((err = smctr_ram_memory_test(dev))) { printk(KERN_ERR "%s: RAM memory test failed.\n", dev->name); - return (-EIO); + return -EIO; } smctr_set_rx_look_ahead(dev); @@ -1608,7 +1610,7 @@ static int smctr_init_adapter(struct net_device *dev) { printk(KERN_ERR "%s: Initialization of card failed (%d)\n", dev->name, err); - return (-EINVAL); + return -EINVAL; } /* This routine clobbers the TRC's internal registers. */ @@ -1616,7 +1618,7 @@ static int smctr_init_adapter(struct net_device *dev) { printk(KERN_ERR "%s: Card failed internal self test (%d)\n", dev->name, err); - return (-EINVAL); + return -EINVAL; } /* Re-Initialize adapter's internal registers */ @@ -1625,17 +1627,17 @@ static int smctr_init_adapter(struct net_device *dev) { printk(KERN_ERR "%s: Initialization of card failed (%d)\n", dev->name, err); - return (-EINVAL); + return -EINVAL; } smctr_enable_bic_int(dev); if((err = smctr_issue_enable_int_cmd(dev, TRC_INTERRUPT_ENABLE_MASK))) - return (err); + return err; smctr_disable_16bit(dev); - return (0); + return 0; } static int smctr_init_card_real(struct net_device *dev) @@ -1703,15 +1705,15 @@ static int smctr_init_card_real(struct net_device *dev) smctr_init_shared_memory(dev); if((err = smctr_issue_init_timers_cmd(dev))) - return (err); + return err; if((err = smctr_issue_init_txrx_cmd(dev))) { printk(KERN_ERR "%s: Hardware failure\n", dev->name); - return (err); + return err; } - return (0); + return 0; } static int smctr_init_rx_bdbs(struct net_device *dev) @@ -1763,7 +1765,7 @@ static int smctr_init_rx_bdbs(struct net_device *dev) tp->rx_bdb_curr[i] = tp->rx_bdb_head[i]->next_ptr; } - return (0); + return 0; } static int smctr_init_rx_fcbs(struct net_device *dev) @@ -1813,7 +1815,7 @@ static int smctr_init_rx_fcbs(struct net_device *dev) tp->rx_fcb_curr[i] = tp->rx_fcb_head[i]->next_ptr; } - return(0); + return 0; } static int smctr_init_shared_memory(struct net_device *dev) @@ -1871,7 +1873,7 @@ static int smctr_init_shared_memory(struct net_device *dev) smctr_init_rx_bdbs(dev); smctr_init_rx_fcbs(dev); - return (0); + return 0; } static int smctr_init_tx_bdbs(struct net_device *dev) @@ -1901,7 +1903,7 @@ static int smctr_init_tx_bdbs(struct net_device *dev) tp->tx_bdb_head[i]->back_ptr = bdb; } - return (0); + return 0; } static int smctr_init_tx_fcbs(struct net_device *dev) @@ -1940,7 +1942,7 @@ static int smctr_init_tx_fcbs(struct net_device *dev) tp->num_tx_fcbs_used[i] = 0; } - return (0); + return 0; } static int smctr_internal_self_test(struct net_device *dev) @@ -1949,33 +1951,33 @@ static int smctr_internal_self_test(struct net_device *dev) int err; if((err = smctr_issue_test_internal_rom_cmd(dev))) - return (err); + return err; if((err = smctr_wait_cmd(dev))) - return (err); + return err; if(tp->acb_head->cmd_done_status & 0xff) - return (-1); + return -1; if((err = smctr_issue_test_hic_cmd(dev))) - return (err); + return err; if((err = smctr_wait_cmd(dev))) - return (err); + return err; if(tp->acb_head->cmd_done_status & 0xff) - return (-1); + return -1; if((err = smctr_issue_test_mac_reg_cmd(dev))) - return (err); + return err; if((err = smctr_wait_cmd(dev))) - return (err); + return err; if(tp->acb_head->cmd_done_status & 0xff) - return (-1); + return -1; - return (0); + return 0; } /* @@ -2468,14 +2470,14 @@ static int smctr_issue_enable_int_cmd(struct net_device *dev, int err; if((err = smctr_wait_while_cbusy(dev))) - return (err); + return err; tp->sclb_ptr->int_mask_control = interrupt_enable_mask; tp->sclb_ptr->valid_command = SCLB_VALID | SCLB_CMD_CLEAR_INTERRUPT_MASK; smctr_set_ctrl_attention(dev); - return (0); + return 0; } static int smctr_issue_int_ack(struct net_device *dev, __u16 iack_code, __u16 ibits) @@ -2483,7 +2485,7 @@ static int smctr_issue_int_ack(struct net_device *dev, __u16 iack_code, __u16 ib struct net_local *tp = netdev_priv(dev); if(smctr_wait_while_cbusy(dev)) - return (-1); + return -1; tp->sclb_ptr->int_mask_control = ibits; tp->sclb_ptr->iack_code = iack_code << 1; /* use the offset from base */ tp->sclb_ptr->resume_control = 0; @@ -2491,7 +2493,7 @@ static int smctr_issue_int_ack(struct net_device *dev, __u16 iack_code, __u16 ib smctr_set_ctrl_attention(dev); - return (0); + return 0; } static int smctr_issue_init_timers_cmd(struct net_device *dev) @@ -2502,10 +2504,10 @@ static int smctr_issue_init_timers_cmd(struct net_device *dev) __u16 *pTimer_Struc = (__u16 *)tp->misc_command_data; if((err = smctr_wait_while_cbusy(dev))) - return (err); + return err; if((err = smctr_wait_cmd(dev))) - return (err); + return err; tp->config_word0 = THDREN | DMA_TRIGGER | USETPT | NO_AUTOREMOVE; tp->config_word1 = 0; @@ -2648,7 +2650,7 @@ static int smctr_issue_init_timers_cmd(struct net_device *dev) err = smctr_setup_single_cmd_w_data(dev, ACB_CMD_INIT_TRC_TIMERS, 0); - return (err); + return err; } static int smctr_issue_init_txrx_cmd(struct net_device *dev) @@ -2659,12 +2661,12 @@ static int smctr_issue_init_txrx_cmd(struct net_device *dev) void **txrx_ptrs = (void *)tp->misc_command_data; if((err = smctr_wait_while_cbusy(dev))) - return (err); + return err; if((err = smctr_wait_cmd(dev))) { printk(KERN_ERR "%s: Hardware failure\n", dev->name); - return (err); + return err; } /* Initialize Transmit Queue Pointers that are used, to point to @@ -2695,7 +2697,7 @@ static int smctr_issue_init_txrx_cmd(struct net_device *dev) err = smctr_setup_single_cmd_w_data(dev, ACB_CMD_INIT_TX_RX, 0); - return (err); + return err; } static int smctr_issue_insert_cmd(struct net_device *dev) @@ -2704,7 +2706,7 @@ static int smctr_issue_insert_cmd(struct net_device *dev) err = smctr_setup_single_cmd(dev, ACB_CMD_INSERT, ACB_SUB_CMD_NOP); - return (err); + return err; } static int smctr_issue_read_ring_status_cmd(struct net_device *dev) @@ -2712,15 +2714,15 @@ static int smctr_issue_read_ring_status_cmd(struct net_device *dev) int err; if((err = smctr_wait_while_cbusy(dev))) - return (err); + return err; if((err = smctr_wait_cmd(dev))) - return (err); + return err; err = smctr_setup_single_cmd_w_data(dev, ACB_CMD_READ_TRC_STATUS, RW_TRC_STATUS_BLOCK); - return (err); + return err; } static int smctr_issue_read_word_cmd(struct net_device *dev, __u16 aword_cnt) @@ -2728,15 +2730,15 @@ static int smctr_issue_read_word_cmd(struct net_device *dev, __u16 aword_cnt) int err; if((err = smctr_wait_while_cbusy(dev))) - return (err); + return err; if((err = smctr_wait_cmd(dev))) - return (err); + return err; err = smctr_setup_single_cmd_w_data(dev, ACB_CMD_MCT_READ_VALUE, aword_cnt); - return (err); + return err; } static int smctr_issue_remove_cmd(struct net_device *dev) @@ -2745,14 +2747,14 @@ static int smctr_issue_remove_cmd(struct net_device *dev) int err; if((err = smctr_wait_while_cbusy(dev))) - return (err); + return err; tp->sclb_ptr->resume_control = 0; tp->sclb_ptr->valid_command = SCLB_VALID | SCLB_CMD_REMOVE; smctr_set_ctrl_attention(dev); - return (0); + return 0; } static int smctr_issue_resume_acb_cmd(struct net_device *dev) @@ -2761,7 +2763,7 @@ static int smctr_issue_resume_acb_cmd(struct net_device *dev) int err; if((err = smctr_wait_while_cbusy(dev))) - return (err); + return err; tp->sclb_ptr->resume_control = SCLB_RC_ACB; tp->sclb_ptr->valid_command = SCLB_VALID | SCLB_RESUME_CONTROL_VALID; @@ -2770,7 +2772,7 @@ static int smctr_issue_resume_acb_cmd(struct net_device *dev) smctr_set_ctrl_attention(dev); - return (0); + return 0; } static int smctr_issue_resume_rx_bdb_cmd(struct net_device *dev, __u16 queue) @@ -2779,7 +2781,7 @@ static int smctr_issue_resume_rx_bdb_cmd(struct net_device *dev, __u16 queue) int err; if((err = smctr_wait_while_cbusy(dev))) - return (err); + return err; if(queue == MAC_QUEUE) tp->sclb_ptr->resume_control = SCLB_RC_RX_MAC_BDB; @@ -2790,7 +2792,7 @@ static int smctr_issue_resume_rx_bdb_cmd(struct net_device *dev, __u16 queue) smctr_set_ctrl_attention(dev); - return (0); + return 0; } static int smctr_issue_resume_rx_fcb_cmd(struct net_device *dev, __u16 queue) @@ -2801,7 +2803,7 @@ static int smctr_issue_resume_rx_fcb_cmd(struct net_device *dev, __u16 queue) printk(KERN_DEBUG "%s: smctr_issue_resume_rx_fcb_cmd\n", dev->name); if(smctr_wait_while_cbusy(dev)) - return (-1); + return -1; if(queue == MAC_QUEUE) tp->sclb_ptr->resume_control = SCLB_RC_RX_MAC_FCB; @@ -2812,7 +2814,7 @@ static int smctr_issue_resume_rx_fcb_cmd(struct net_device *dev, __u16 queue) smctr_set_ctrl_attention(dev); - return (0); + return 0; } static int smctr_issue_resume_tx_fcb_cmd(struct net_device *dev, __u16 queue) @@ -2823,14 +2825,14 @@ static int smctr_issue_resume_tx_fcb_cmd(struct net_device *dev, __u16 queue) printk(KERN_DEBUG "%s: smctr_issue_resume_tx_fcb_cmd\n", dev->name); if(smctr_wait_while_cbusy(dev)) - return (-1); + return -1; tp->sclb_ptr->resume_control = (SCLB_RC_TFCB0 << queue); tp->sclb_ptr->valid_command = SCLB_RESUME_CONTROL_VALID | SCLB_VALID; smctr_set_ctrl_attention(dev); - return (0); + return 0; } static int smctr_issue_test_internal_rom_cmd(struct net_device *dev) @@ -2840,7 +2842,7 @@ static int smctr_issue_test_internal_rom_cmd(struct net_device *dev) err = smctr_setup_single_cmd(dev, ACB_CMD_MCT_TEST, TRC_INTERNAL_ROM_TEST); - return (err); + return err; } static int smctr_issue_test_hic_cmd(struct net_device *dev) @@ -2850,7 +2852,7 @@ static int smctr_issue_test_hic_cmd(struct net_device *dev) err = smctr_setup_single_cmd(dev, ACB_CMD_HIC_TEST, TRC_HOST_INTERFACE_REG_TEST); - return (err); + return err; } static int smctr_issue_test_mac_reg_cmd(struct net_device *dev) @@ -2860,7 +2862,7 @@ static int smctr_issue_test_mac_reg_cmd(struct net_device *dev) err = smctr_setup_single_cmd(dev, ACB_CMD_MCT_TEST, TRC_MAC_REGISTERS_TEST); - return (err); + return err; } static int smctr_issue_trc_loopback_cmd(struct net_device *dev) @@ -2870,7 +2872,7 @@ static int smctr_issue_trc_loopback_cmd(struct net_device *dev) err = smctr_setup_single_cmd(dev, ACB_CMD_MCT_TEST, TRC_INTERNAL_LOOPBACK); - return (err); + return err; } static int smctr_issue_tri_loopback_cmd(struct net_device *dev) @@ -2880,7 +2882,7 @@ static int smctr_issue_tri_loopback_cmd(struct net_device *dev) err = smctr_setup_single_cmd(dev, ACB_CMD_MCT_TEST, TRC_TRI_LOOPBACK); - return (err); + return err; } static int smctr_issue_write_byte_cmd(struct net_device *dev, @@ -2891,10 +2893,10 @@ static int smctr_issue_write_byte_cmd(struct net_device *dev, int err; if((err = smctr_wait_while_cbusy(dev))) - return (err); + return err; if((err = smctr_wait_cmd(dev))) - return (err); + return err; for(iword = 0, ibyte = 0; iword < (unsigned int)(aword_cnt & 0xff); iword++, ibyte += 2) @@ -2903,8 +2905,8 @@ static int smctr_issue_write_byte_cmd(struct net_device *dev, | (*((__u8 *)byte + ibyte + 1)); } - return (smctr_setup_single_cmd_w_data(dev, ACB_CMD_MCT_WRITE_VALUE, - aword_cnt)); + return smctr_setup_single_cmd_w_data(dev, ACB_CMD_MCT_WRITE_VALUE, + aword_cnt); } static int smctr_issue_write_word_cmd(struct net_device *dev, @@ -2914,10 +2916,10 @@ static int smctr_issue_write_word_cmd(struct net_device *dev, unsigned int i, err; if((err = smctr_wait_while_cbusy(dev))) - return (err); + return err; if((err = smctr_wait_cmd(dev))) - return (err); + return err; for(i = 0; i < (unsigned int)(aword_cnt & 0xff); i++) tp->misc_command_data[i] = *((__u16 *)word + i); @@ -2925,7 +2927,7 @@ static int smctr_issue_write_word_cmd(struct net_device *dev, err = smctr_setup_single_cmd_w_data(dev, ACB_CMD_MCT_WRITE_VALUE, aword_cnt); - return (err); + return err; } static int smctr_join_complete_state(struct net_device *dev) @@ -2935,7 +2937,7 @@ static int smctr_join_complete_state(struct net_device *dev) err = smctr_setup_single_cmd(dev, ACB_CMD_CHANGE_JOIN_STATE, JS_JOIN_COMPLETE_STATE); - return (err); + return err; } static int smctr_link_tx_fcbs_to_bdbs(struct net_device *dev) @@ -2959,7 +2961,7 @@ static int smctr_link_tx_fcbs_to_bdbs(struct net_device *dev) } } - return (0); + return 0; } static int smctr_load_firmware(struct net_device *dev) @@ -2974,7 +2976,7 @@ static int smctr_load_firmware(struct net_device *dev) if (request_firmware(&fw, "tr_smctr.bin", &dev->dev)) { printk(KERN_ERR "%s: firmware not found\n", dev->name); - return (UCODE_NOT_PRESENT); + return UCODE_NOT_PRESENT; } tp->num_of_tx_buffs = 4; @@ -3036,7 +3038,7 @@ static int smctr_load_firmware(struct net_device *dev) smctr_disable_16bit(dev); out: release_firmware(fw); - return (err); + return err; } static int smctr_load_node_addr(struct net_device *dev) @@ -3052,7 +3054,7 @@ static int smctr_load_node_addr(struct net_device *dev) } dev->addr_len = 6; - return (0); + return 0; } /* Lobe Media Test. @@ -3146,14 +3148,14 @@ static int smctr_lobe_media_test_cmd(struct net_device *dev) if(smctr_wait_cmd(dev)) { printk(KERN_ERR "Lobe Failed test state\n"); - return (LOBE_MEDIA_TEST_FAILED); + return LOBE_MEDIA_TEST_FAILED; } } err = smctr_setup_single_cmd(dev, ACB_CMD_MCT_TEST, TRC_LOBE_MEDIA_TEST); - return (err); + return err; } static int smctr_lobe_media_test_state(struct net_device *dev) @@ -3163,7 +3165,7 @@ static int smctr_lobe_media_test_state(struct net_device *dev) err = smctr_setup_single_cmd(dev, ACB_CMD_CHANGE_JOIN_STATE, JS_LOBE_TEST_STATE); - return (err); + return err; } static int smctr_make_8025_hdr(struct net_device *dev, @@ -3212,7 +3214,7 @@ static int smctr_make_8025_hdr(struct net_device *dev, break; } - return (0); + return 0; } static int smctr_make_access_pri(struct net_device *dev, MAC_SUB_VECTOR *tsv) @@ -3225,7 +3227,7 @@ static int smctr_make_access_pri(struct net_device *dev, MAC_SUB_VECTOR *tsv) tsv->svv[0] = MSB(tp->authorized_access_priority); tsv->svv[1] = LSB(tp->authorized_access_priority); - return (0); + return 0; } static int smctr_make_addr_mod(struct net_device *dev, MAC_SUB_VECTOR *tsv) @@ -3236,7 +3238,7 @@ static int smctr_make_addr_mod(struct net_device *dev, MAC_SUB_VECTOR *tsv) tsv->svv[0] = 0; tsv->svv[1] = 0; - return (0); + return 0; } static int smctr_make_auth_funct_class(struct net_device *dev, @@ -3250,7 +3252,7 @@ static int smctr_make_auth_funct_class(struct net_device *dev, tsv->svv[0] = MSB(tp->authorized_function_classes); tsv->svv[1] = LSB(tp->authorized_function_classes); - return (0); + return 0; } static int smctr_make_corr(struct net_device *dev, @@ -3262,7 +3264,7 @@ static int smctr_make_corr(struct net_device *dev, tsv->svv[0] = MSB(correlator); tsv->svv[1] = LSB(correlator); - return (0); + return 0; } static int smctr_make_funct_addr(struct net_device *dev, MAC_SUB_VECTOR *tsv) @@ -3280,7 +3282,7 @@ static int smctr_make_funct_addr(struct net_device *dev, MAC_SUB_VECTOR *tsv) tsv->svv[2] = MSB(tp->misc_command_data[1]); tsv->svv[3] = LSB(tp->misc_command_data[1]); - return (0); + return 0; } static int smctr_make_group_addr(struct net_device *dev, MAC_SUB_VECTOR *tsv) @@ -3305,7 +3307,7 @@ static int smctr_make_group_addr(struct net_device *dev, MAC_SUB_VECTOR *tsv) tsv->svv[2] == 0x00 && tsv->svv[3] == 0x00) tsv->svv[0] = 0x00; - return (0); + return 0; } static int smctr_make_phy_drop_num(struct net_device *dev, @@ -3324,7 +3326,7 @@ static int smctr_make_phy_drop_num(struct net_device *dev, tsv->svv[2] = MSB(tp->misc_command_data[1]); tsv->svv[3] = LSB(tp->misc_command_data[1]); - return (0); + return 0; } static int smctr_make_product_id(struct net_device *dev, MAC_SUB_VECTOR *tsv) @@ -3337,7 +3339,7 @@ static int smctr_make_product_id(struct net_device *dev, MAC_SUB_VECTOR *tsv) for(i = 0; i < 18; i++) tsv->svv[i] = 0xF0; - return (0); + return 0; } static int smctr_make_station_id(struct net_device *dev, MAC_SUB_VECTOR *tsv) @@ -3358,7 +3360,7 @@ static int smctr_make_station_id(struct net_device *dev, MAC_SUB_VECTOR *tsv) tsv->svv[4] = MSB(tp->misc_command_data[2]); tsv->svv[5] = LSB(tp->misc_command_data[2]); - return (0); + return 0; } static int smctr_make_ring_station_status(struct net_device *dev, @@ -3374,7 +3376,7 @@ static int smctr_make_ring_station_status(struct net_device *dev, tsv->svv[4] = 0; tsv->svv[5] = 0; - return (0); + return 0; } static int smctr_make_ring_station_version(struct net_device *dev, @@ -3400,7 +3402,7 @@ static int smctr_make_ring_station_version(struct net_device *dev, else tsv->svv[9] = 0xc4; /* EBCDIC - D */ - return (0); + return 0; } static int smctr_make_tx_status_code(struct net_device *dev, @@ -3414,7 +3416,7 @@ static int smctr_make_tx_status_code(struct net_device *dev, /* Stripped frame status of Transmitted Frame */ tsv->svv[1] = tx_fstatus & 0xff; - return (0); + return 0; } static int smctr_make_upstream_neighbor_addr(struct net_device *dev, @@ -3436,7 +3438,7 @@ static int smctr_make_upstream_neighbor_addr(struct net_device *dev, tsv->svv[4] = MSB(tp->misc_command_data[2]); tsv->svv[5] = LSB(tp->misc_command_data[2]); - return (0); + return 0; } static int smctr_make_wrap_data(struct net_device *dev, MAC_SUB_VECTOR *tsv) @@ -3444,7 +3446,7 @@ static int smctr_make_wrap_data(struct net_device *dev, MAC_SUB_VECTOR *tsv) tsv->svi = WRAP_DATA; tsv->svl = S_WRAP_DATA; - return (0); + return 0; } /* @@ -3464,9 +3466,9 @@ static int smctr_open(struct net_device *dev) err = smctr_init_adapter(dev); if(err < 0) - return (err) |