Remove braces from a few single line if statements. Signed-off-by: Mark Einon <mark.einon@xxxxxxxxx> --- drivers/staging/et131x/et131x.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index 55a6d59..786cb98 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -834,11 +834,10 @@ static void et131x_rx_dma_enable(struct et131x_adapter *adapter) if (csr & ET_RXDMA_CSR_HALT_STATUS) { udelay(5); csr = readl(&adapter->regs->rxdma.csr); - if (csr & ET_RXDMA_CSR_HALT_STATUS) { + if (csr & ET_RXDMA_CSR_HALT_STATUS) dev_err(&adapter->pdev->dev, "RX Dma failed to exit halt state. CSR 0x%08x\n", csr); - } } } @@ -1013,11 +1012,10 @@ static void et1310_config_mac_regs2(struct et131x_adapter *adapter) cfg1 = readl(&mac->cfg1); } while ((cfg1 & ET_MAC_CFG1_WAIT) != ET_MAC_CFG1_WAIT && delay < 100); - if (delay == 100) { + if (delay == 100) dev_warn(&adapter->pdev->dev, "Syncd bits did not respond correctly cfg1 word 0x%08x\n", cfg1); - } /* Enable txmac */ ctl |= ET_TX_CTRL_TXMAC_ENABLE | ET_TX_CTRL_FC_DISABLE; @@ -2747,10 +2745,9 @@ static void et131x_handle_recv_interrupt(struct et131x_adapter *adapter) adapter->net_stats.rx_packets++; /* Set the status on the packet, either resources or success */ - if (adapter->rx_ring.num_ready_recv < RFD_LOW_WATER_MARK) { - dev_warn(&adapter->pdev->dev, - "RFD's are running out\n"); - } + if (adapter->rx_ring.num_ready_recv < RFD_LOW_WATER_MARK) + dev_warn(&adapter->pdev->dev, "RFD's are running out\n"); + count++; } @@ -3017,10 +3014,10 @@ static int nic_send_packet(struct et131x_adapter *adapter, struct tcb *tcb) /* For Gig only, we use Tx Interrupt coalescing. Enable the software * timer to wake us up if this packet isn't followed by N more. */ - if (phydev && phydev->speed == SPEED_1000) { + if (phydev && phydev->speed == SPEED_1000) writel(PARM_TX_TIME_INT_DEF * NANO_IN_A_MICRO, &adapter->regs->global.watchdog_timer); - } + spin_unlock_irqrestore(&adapter->send_hw_lock, flags); return 0; @@ -3068,11 +3065,10 @@ static int send_packet(struct sk_buff *skb, struct et131x_adapter *adapter) shbufva = (u16 *) skb->data; if ((shbufva[0] == 0xffff) && - (shbufva[1] == 0xffff) && (shbufva[2] == 0xffff)) { + (shbufva[1] == 0xffff) && (shbufva[2] == 0xffff)) tcb->flags |= FMP_DEST_BROAD; - } else if ((shbufva[0] & 0x3) == 0x0001) { + else if ((shbufva[0] & 0x3) == 0x0001) tcb->flags |= FMP_DEST_MULTI; - } } tcb->next = NULL; @@ -3664,7 +3660,7 @@ static void et131x_error_timer_handler(unsigned long data) adapter->boot_coma++; if (adapter->boot_coma == 10) { - if (!phydev->link) { + if (!phydev->link) if (!et1310_in_phy_coma(adapter)) { /* NOTE - This was originally a 'sync with * interrupt'. How to do that under Linux? @@ -3672,7 +3668,6 @@ static void et131x_error_timer_handler(unsigned long data) et131x_enable_interrupts(adapter); et1310_enable_phy_coma(adapter); } - } } /* This is a periodic timer, so reschedule */ @@ -4156,7 +4151,7 @@ static void et131x_isr_handler(struct work_struct *work) } /* Handle RXDMA Error Interrupt */ - if (status & ET_INTR_RXDMA_ERR) { + if (status & ET_INTR_RXDMA_ERR) /* The rxdma_error interrupt is sent when a time-out on a * request issued by the JAGCore has occurred or a completion is * returned with an un-successful status. In both cases the @@ -4172,21 +4167,18 @@ static void et131x_isr_handler(struct work_struct *work) * something bad has occurred. A reset might be the thing to do. */ /* TRAP();*/ - dev_warn(&adapter->pdev->dev, "RxDMA_ERR interrupt, error %x\n", readl(&iomem->txmac.tx_test)); - } /* Handle the Wake on LAN Event */ - if (status & ET_INTR_WOL) { + if (status & ET_INTR_WOL) /* This is a secondary interrupt for wake on LAN. The driver * should never see this, if it does, something serious is * wrong. We will TRAP the message when we are in DBG mode, * otherwise we will ignore it. */ dev_err(&adapter->pdev->dev, "WAKE_ON_LAN interrupt\n"); - } /* Let's move on to the TxMac */ if (status & ET_INTR_TXMAC) { @@ -4232,13 +4224,12 @@ static void et131x_isr_handler(struct work_struct *work) } /* Handle MAC_STAT Interrupt */ - if (status & ET_INTR_MAC_STAT) { + if (status & ET_INTR_MAC_STAT) /* This means at least one of the un-masked counters in the * MAC_STAT block has rolled over. Use this to maintain the top, * software managed bits of the counter(s). */ et1310_handle_macstat_interrupt(adapter); - } /* Handle SLV Timeout Interrupt */ if (status & ET_INTR_SLV_TIMEOUT) { @@ -4494,10 +4485,10 @@ static void et131x_multicast(struct net_device *netdev) * NOTE - This block will always update the multicast_list with the * hardware, even if the addresses aren't the same. */ - if (packet_filter != adapter->packet_filter) { + if (packet_filter != adapter->packet_filter) /* Call the device's filter function */ et131x_set_packet_filter(adapter); - } + spin_unlock_irqrestore(&adapter->lock, flags); } -- 1.7.10.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel