Commit 12a2f3f3 authored by Mark Einon's avatar Mark Einon Committed by Greg Kroah-Hartman

staging: et131x: trivial whitespace and line / character reductions

Tweak some whitespace, also remove a few redundant lines and
characters (mainly of type 'if (status != 0)' -> 'if (status)').
Signed-off-by: default avatarMark Einon <mark.einon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 15ae239d
...@@ -1039,9 +1039,7 @@ static void et1310_config_mac_regs2(struct et131x_adapter *adapter) ...@@ -1039,9 +1039,7 @@ static void et1310_config_mac_regs2(struct et131x_adapter *adapter)
*/ */
static int et1310_in_phy_coma(struct et131x_adapter *adapter) static int et1310_in_phy_coma(struct et131x_adapter *adapter)
{ {
u32 pmcsr; u32 pmcsr = readl(&adapter->regs->global.pm_csr);
pmcsr = readl(&adapter->regs->global.pm_csr);
return ET_PM_PHY_SW_COMA & pmcsr ? 1 : 0; return ET_PM_PHY_SW_COMA & pmcsr ? 1 : 0;
} }
...@@ -2115,7 +2113,7 @@ static inline u32 bump_free_buff_ring(u32 *free_buff_ring, u32 limit) ...@@ -2115,7 +2113,7 @@ static inline u32 bump_free_buff_ring(u32 *free_buff_ring, u32 limit)
tmp_free_buff_ring ^= ET_DMA10_WRAP; tmp_free_buff_ring ^= ET_DMA10_WRAP;
} }
/* For the 1023 case */ /* For the 1023 case */
tmp_free_buff_ring &= (ET_DMA10_MASK|ET_DMA10_WRAP); tmp_free_buff_ring &= (ET_DMA10_MASK | ET_DMA10_WRAP);
*free_buff_ring = tmp_free_buff_ring; *free_buff_ring = tmp_free_buff_ring;
return tmp_free_buff_ring; return tmp_free_buff_ring;
} }
...@@ -2620,7 +2618,7 @@ static struct rfd *nic_rx_pkts(struct et131x_adapter *adapter) ...@@ -2620,7 +2618,7 @@ static struct rfd *nic_rx_pkts(struct et131x_adapter *adapter)
adapter->stats.unicast_pkts_rcvd++; adapter->stats.unicast_pkts_rcvd++;
} }
if (len == 0) { if (!len) {
rfd->len = 0; rfd->len = 0;
goto out; goto out;
} }
...@@ -3607,14 +3605,14 @@ static int et131x_adapter_memory_alloc(struct et131x_adapter *adapter) ...@@ -3607,14 +3605,14 @@ static int et131x_adapter_memory_alloc(struct et131x_adapter *adapter)
/* Allocate memory for the Tx Ring */ /* Allocate memory for the Tx Ring */
status = et131x_tx_dma_memory_alloc(adapter); status = et131x_tx_dma_memory_alloc(adapter);
if (status != 0) { if (status) {
dev_err(&adapter->pdev->dev, dev_err(&adapter->pdev->dev,
"et131x_tx_dma_memory_alloc FAILED\n"); "et131x_tx_dma_memory_alloc FAILED\n");
return status; return status;
} }
/* Receive buffer memory allocation */ /* Receive buffer memory allocation */
status = et131x_rx_dma_memory_alloc(adapter); status = et131x_rx_dma_memory_alloc(adapter);
if (status != 0) { if (status) {
dev_err(&adapter->pdev->dev, dev_err(&adapter->pdev->dev,
"et131x_rx_dma_memory_alloc FAILED\n"); "et131x_rx_dma_memory_alloc FAILED\n");
et131x_tx_dma_memory_free(adapter); et131x_tx_dma_memory_free(adapter);
...@@ -3624,8 +3622,7 @@ static int et131x_adapter_memory_alloc(struct et131x_adapter *adapter) ...@@ -3624,8 +3622,7 @@ static int et131x_adapter_memory_alloc(struct et131x_adapter *adapter)
/* Init receive data structures */ /* Init receive data structures */
status = et131x_init_recv(adapter); status = et131x_init_recv(adapter);
if (status) { if (status) {
dev_err(&adapter->pdev->dev, dev_err(&adapter->pdev->dev, "et131x_init_recv FAILED\n");
"et131x_init_recv FAILED\n");
et131x_adapter_memory_free(adapter); et131x_adapter_memory_free(adapter);
} }
return status; return status;
...@@ -3755,7 +3752,8 @@ static int et131x_mii_probe(struct net_device *netdev) ...@@ -3755,7 +3752,8 @@ static int et131x_mii_probe(struct net_device *netdev)
phydev->advertising = phydev->supported; phydev->advertising = phydev->supported;
adapter->phydev = phydev; adapter->phydev = phydev;
dev_info(&adapter->pdev->dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s)\n", dev_info(&adapter->pdev->dev,
"attached PHY driver [%s] (mii_bus:phy_addr=%s)\n",
phydev->drv->name, dev_name(&phydev->dev)); phydev->drv->name, dev_name(&phydev->dev));
return 0; return 0;
...@@ -3940,7 +3938,7 @@ static irqreturn_t et131x_isr(int irq, void *dev_id) ...@@ -3940,7 +3938,7 @@ static irqreturn_t et131x_isr(int irq, void *dev_id)
status &= ~ET_INTR_WATCHDOG; status &= ~ET_INTR_WATCHDOG;
} }
if (status == 0) { if (!status) {
/* This interrupt has in some way been "handled" by /* This interrupt has in some way been "handled" by
* the ISR. Either it was a spurious Rx interrupt, or * the ISR. Either it was a spurious Rx interrupt, or
* it was a Tx interrupt that has been filtered by * it was a Tx interrupt that has been filtered by
...@@ -3996,10 +3994,8 @@ static void et131x_isr_handler(struct work_struct *work) ...@@ -3996,10 +3994,8 @@ static void et131x_isr_handler(struct work_struct *work)
/* Handle the TXDMA Error interrupt */ /* Handle the TXDMA Error interrupt */
if (status & ET_INTR_TXDMA_ERR) { if (status & ET_INTR_TXDMA_ERR) {
u32 txdma_err;
/* Following read also clears the register (COR) */ /* Following read also clears the register (COR) */
txdma_err = readl(&iomem->txdma.tx_dma_error); u32 txdma_err = readl(&iomem->txdma.tx_dma_error);
dev_warn(&adapter->pdev->dev, dev_warn(&adapter->pdev->dev,
"TXDMA_ERR interrupt, error = %d\n", "TXDMA_ERR interrupt, error = %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment