Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Mark Einon and committed by
Greg Kroah-Hartman
12a2f3f3 15ae239d

+14 -18
+14 -18
drivers/staging/et131x/et131x.c
··· 1039 1039 */ 1040 1040 static int et1310_in_phy_coma(struct et131x_adapter *adapter) 1041 1041 { 1042 - u32 pmcsr; 1043 - 1044 - pmcsr = readl(&adapter->regs->global.pm_csr); 1042 + u32 pmcsr = readl(&adapter->regs->global.pm_csr); 1045 1043 1046 1044 return ET_PM_PHY_SW_COMA & pmcsr ? 1 : 0; 1047 1045 } ··· 1928 1930 1929 1931 /* Enable all global interrupts */ 1930 1932 if (adapter->flowcontrol == FLOW_TXONLY || 1931 - adapter->flowcontrol == FLOW_BOTH) 1933 + adapter->flowcontrol == FLOW_BOTH) 1932 1934 mask = INT_MASK_ENABLE; 1933 1935 else 1934 1936 mask = INT_MASK_ENABLE_NO_FLOW; ··· 2113 2115 tmp_free_buff_ring ^= ET_DMA10_WRAP; 2114 2116 } 2115 2117 /* For the 1023 case */ 2116 - tmp_free_buff_ring &= (ET_DMA10_MASK|ET_DMA10_WRAP); 2118 + tmp_free_buff_ring &= (ET_DMA10_MASK | ET_DMA10_WRAP); 2117 2119 *free_buff_ring = tmp_free_buff_ring; 2118 2120 return tmp_free_buff_ring; 2119 2121 } ··· 2618 2620 adapter->stats.unicast_pkts_rcvd++; 2619 2621 } 2620 2622 2621 - if (len == 0) { 2623 + if (!len) { 2622 2624 rfd->len = 0; 2623 2625 goto out; 2624 2626 } ··· 3472 3474 * the MAC address. At this point the I/O registers have yet to be mapped 3473 3475 */ 3474 3476 static int et131x_pci_init(struct et131x_adapter *adapter, 3475 - struct pci_dev *pdev) 3477 + struct pci_dev *pdev) 3476 3478 { 3477 3479 u16 max_payload; 3478 3480 int i, rc; ··· 3605 3607 3606 3608 /* Allocate memory for the Tx Ring */ 3607 3609 status = et131x_tx_dma_memory_alloc(adapter); 3608 - if (status != 0) { 3610 + if (status) { 3609 3611 dev_err(&adapter->pdev->dev, 3610 3612 "et131x_tx_dma_memory_alloc FAILED\n"); 3611 3613 return status; 3612 3614 } 3613 3615 /* Receive buffer memory allocation */ 3614 3616 status = et131x_rx_dma_memory_alloc(adapter); 3615 - if (status != 0) { 3617 + if (status) { 3616 3618 dev_err(&adapter->pdev->dev, 3617 3619 "et131x_rx_dma_memory_alloc FAILED\n"); 3618 3620 et131x_tx_dma_memory_free(adapter); ··· 3622 3624 /* Init receive data structures */ 3623 3625 status = et131x_init_recv(adapter); 3624 3626 if (status) { 3625 - dev_err(&adapter->pdev->dev, 3626 - "et131x_init_recv FAILED\n"); 3627 + dev_err(&adapter->pdev->dev, "et131x_init_recv FAILED\n"); 3627 3628 et131x_adapter_memory_free(adapter); 3628 3629 } 3629 3630 return status; ··· 3752 3755 phydev->advertising = phydev->supported; 3753 3756 adapter->phydev = phydev; 3754 3757 3755 - dev_info(&adapter->pdev->dev, "attached PHY driver [%s] (mii_bus:phy_addr=%s)\n", 3758 + dev_info(&adapter->pdev->dev, 3759 + "attached PHY driver [%s] (mii_bus:phy_addr=%s)\n", 3756 3760 phydev->drv->name, dev_name(&phydev->dev)); 3757 3761 3758 3762 return 0; ··· 3765 3767 * them together with the platform provided device structures. 3766 3768 */ 3767 3769 static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev, 3768 - struct pci_dev *pdev) 3770 + struct pci_dev *pdev) 3769 3771 { 3770 3772 static const u8 default_mac[] = { 0x00, 0x05, 0x3d, 0x00, 0x02, 0x00 }; 3771 3773 ··· 3938 3940 status &= ~ET_INTR_WATCHDOG; 3939 3941 } 3940 3942 3941 - if (status == 0) { 3943 + if (!status) { 3942 3944 /* This interrupt has in some way been "handled" by 3943 3945 * the ISR. Either it was a spurious Rx interrupt, or 3944 3946 * it was a Tx interrupt that has been filtered by ··· 3994 3996 3995 3997 /* Handle the TXDMA Error interrupt */ 3996 3998 if (status & ET_INTR_TXDMA_ERR) { 3997 - u32 txdma_err; 3998 - 3999 3999 /* Following read also clears the register (COR) */ 4000 - txdma_err = readl(&iomem->txdma.tx_dma_error); 4000 + u32 txdma_err = readl(&iomem->txdma.tx_dma_error); 4001 4001 4002 4002 dev_warn(&adapter->pdev->dev, 4003 4003 "TXDMA_ERR interrupt, error = %d\n", ··· 4573 4577 * a device insertion routine. 4574 4578 */ 4575 4579 static int et131x_pci_setup(struct pci_dev *pdev, 4576 - const struct pci_device_id *ent) 4580 + const struct pci_device_id *ent) 4577 4581 { 4578 4582 struct net_device *netdev; 4579 4583 struct et131x_adapter *adapter;