mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
[PATCH] skge: formmating and whitespace cleanup
Reformat some code to make it easier to read. And whitespace fixes. Signed-off-by: Stephen Hemminger <sheminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
c68ce71a34
commit
203babb650
1 changed files with 18 additions and 12 deletions
|
@ -2177,15 +2177,17 @@ static int skge_up(struct net_device *dev)
|
||||||
|
|
||||||
memset(skge->mem, 0, skge->mem_size);
|
memset(skge->mem, 0, skge->mem_size);
|
||||||
|
|
||||||
if ((err = skge_ring_alloc(&skge->rx_ring, skge->mem, skge->dma)))
|
err = skge_ring_alloc(&skge->rx_ring, skge->mem, skge->dma);
|
||||||
|
if (err)
|
||||||
goto free_pci_mem;
|
goto free_pci_mem;
|
||||||
|
|
||||||
err = skge_rx_fill(skge);
|
err = skge_rx_fill(skge);
|
||||||
if (err)
|
if (err)
|
||||||
goto free_rx_ring;
|
goto free_rx_ring;
|
||||||
|
|
||||||
if ((err = skge_ring_alloc(&skge->tx_ring, skge->mem + rx_size,
|
err = skge_ring_alloc(&skge->tx_ring, skge->mem + rx_size,
|
||||||
skge->dma + rx_size)))
|
skge->dma + rx_size);
|
||||||
|
if (err)
|
||||||
goto free_rx_ring;
|
goto free_rx_ring;
|
||||||
|
|
||||||
skge->tx_avail = skge->tx_ring.count - 1;
|
skge->tx_avail = skge->tx_ring.count - 1;
|
||||||
|
@ -3240,13 +3242,15 @@ static int __devinit skge_probe(struct pci_dev *pdev,
|
||||||
struct skge_hw *hw;
|
struct skge_hw *hw;
|
||||||
int err, using_dac = 0;
|
int err, using_dac = 0;
|
||||||
|
|
||||||
if ((err = pci_enable_device(pdev))) {
|
err = pci_enable_device(pdev);
|
||||||
|
if (err) {
|
||||||
printk(KERN_ERR PFX "%s cannot enable PCI device\n",
|
printk(KERN_ERR PFX "%s cannot enable PCI device\n",
|
||||||
pci_name(pdev));
|
pci_name(pdev));
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((err = pci_request_regions(pdev, DRV_NAME))) {
|
err = pci_request_regions(pdev, DRV_NAME);
|
||||||
|
if (err) {
|
||||||
printk(KERN_ERR PFX "%s cannot obtain PCI resources\n",
|
printk(KERN_ERR PFX "%s cannot obtain PCI resources\n",
|
||||||
pci_name(pdev));
|
pci_name(pdev));
|
||||||
goto err_out_disable_pdev;
|
goto err_out_disable_pdev;
|
||||||
|
@ -3298,7 +3302,8 @@ static int __devinit skge_probe(struct pci_dev *pdev,
|
||||||
goto err_out_free_hw;
|
goto err_out_free_hw;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((err = request_irq(pdev->irq, skge_intr, SA_SHIRQ, DRV_NAME, hw))) {
|
err = request_irq(pdev->irq, skge_intr, SA_SHIRQ, DRV_NAME, hw);
|
||||||
|
if (err) {
|
||||||
printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
|
printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
|
||||||
pci_name(pdev), pdev->irq);
|
pci_name(pdev), pdev->irq);
|
||||||
goto err_out_iounmap;
|
goto err_out_iounmap;
|
||||||
|
@ -3316,7 +3321,8 @@ static int __devinit skge_probe(struct pci_dev *pdev,
|
||||||
if ((dev = skge_devinit(hw, 0, using_dac)) == NULL)
|
if ((dev = skge_devinit(hw, 0, using_dac)) == NULL)
|
||||||
goto err_out_led_off;
|
goto err_out_led_off;
|
||||||
|
|
||||||
if ((err = register_netdev(dev))) {
|
err = register_netdev(dev);
|
||||||
|
if (err) {
|
||||||
printk(KERN_ERR PFX "%s: cannot register net device\n",
|
printk(KERN_ERR PFX "%s: cannot register net device\n",
|
||||||
pci_name(pdev));
|
pci_name(pdev));
|
||||||
goto err_out_free_netdev;
|
goto err_out_free_netdev;
|
||||||
|
|
Loading…
Reference in a new issue