public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel•com>
To: jeff@garzik•org
Cc: netdev@vger•kernel.org, davem@davemloft•net,
	Jesse Brandeburg <jesse.brandeburg@intel•com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel•com>
Subject: [NET-NEXT PATCH 21/25] ixgb: clean up assignments inside if statements
Date: Tue, 08 Jul 2008 15:52:48 -0700	[thread overview]
Message-ID: <20080708225248.6925.83391.stgit@localhost.localdomain> (raw)
In-Reply-To: <20080708224858.6925.29725.stgit@localhost.localdomain>

From: Jesse Brandeburg <jesse.brandeburg@intel•com>

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel•com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel•com>
---

 drivers/net/ixgb/ixgb_main.c |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 365212b..05b2677 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -355,15 +355,16 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	int i;
 	int err;
 
-	if ((err = pci_enable_device(pdev)))
+	err = pci_enable_device(pdev);
+	if (err)
 		return err;
 
 	if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) &&
-	   !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) {
+	    !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) {
 		pci_using_dac = 1;
 	} else {
 		if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) ||
-		   (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) {
+		    (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) {
 			printk(KERN_ERR
 			 "ixgb: No usable DMA configuration, aborting\n");
 			goto err_dma_mask;
@@ -371,7 +372,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		pci_using_dac = 0;
 	}
 
-	if ((err = pci_request_regions(pdev, ixgb_driver_name)))
+	err = pci_request_regions(pdev, ixgb_driver_name);
+	if (err)
 		goto err_request_regions;
 
 	pci_set_master(pdev);
@@ -435,7 +437,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	/* setup the private structure */
 
-	if ((err = ixgb_sw_init(adapter)))
+	err = ixgb_sw_init(adapter);
+	if (err)
 		goto err_sw_init;
 
 	netdev->features = NETIF_F_SG |
@@ -474,7 +477,8 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	INIT_WORK(&adapter->tx_timeout_task, ixgb_tx_timeout_task);
 
 	strcpy(netdev->name, "eth%d");
-	if ((err = register_netdev(netdev)))
+	err = register_netdev(netdev);
+	if (err)
 		goto err_register;
 
 	/* we're going to reset, so assume we have no link for now */
@@ -594,16 +598,18 @@ ixgb_open(struct net_device *netdev)
 	int err;
 
 	/* allocate transmit descriptors */
-
-	if ((err = ixgb_setup_tx_resources(adapter)))
+	err = ixgb_setup_tx_resources(adapter);
+	if (err)
 		goto err_setup_tx;
 
 	/* allocate receive descriptors */
 
-	if ((err = ixgb_setup_rx_resources(adapter)))
+	err = ixgb_setup_rx_resources(adapter);
+	if (err)
 		goto err_setup_rx;
 
-	if ((err = ixgb_up(adapter)))
+	err = ixgb_up(adapter);
+	if (err)
 		goto err_up;
 
 	return 0;


  parent reply	other threads:[~2008-07-08 22:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-08 22:51 [NET-NEXT PATCH 00/25] ixgb: update to latest Jeff Kirsher
2008-07-08 22:51 ` [NET-NEXT PATCH 01/25] ixgb: maybe stop tx port missed a piece Jeff Kirsher
2008-07-11  5:21   ` Jeff Garzik
2008-07-08 22:51 ` [NET-NEXT PATCH 02/25] ixgb: repeat 32 bit ioremap cleanup Jeff Kirsher
2008-07-08 22:51 ` [NET-NEXT PATCH 03/25] ixgb: fix bug in descriptor ring due to prefetch corruption Jeff Kirsher
2008-07-08 22:51 ` [NET-NEXT PATCH 04/25] ixgb: leave room for extra hardware memory usage Jeff Kirsher
2008-07-08 22:51 ` [NET-NEXT PATCH 05/25] ixgb: check down state before enable irq Jeff Kirsher
2008-07-08 22:51 ` [NET-NEXT PATCH 06/25] ixgb: don't allow too small MTU Jeff Kirsher
2008-07-08 22:51 ` [NET-NEXT PATCH 07/25] ixgb: move time stamp set before setting dma pointer Jeff Kirsher
2008-07-08 22:51 ` [NET-NEXT PATCH 08/25] ixgb: fix race on rx_buffer_len in mtu change Jeff Kirsher
2008-07-08 22:51 ` [NET-NEXT PATCH 09/25] ixgb: fix unload race with timers Jeff Kirsher
2008-07-08 22:51 ` [NET-NEXT PATCH 10/25] ixgb: remove lltx support and update tx routine Jeff Kirsher
2008-07-08 22:51 ` [NET-NEXT PATCH 11/25] ixgb: update readme text Jeff Kirsher
2008-07-08 22:52 ` [NET-NEXT PATCH 12/25] ixgb: add copybreak parameter Jeff Kirsher
2008-07-08 22:52 ` [NET-NEXT PATCH 13/25] ixgb: clean up un-necessary declarations Jeff Kirsher
2008-07-08 22:52 ` [NET-NEXT PATCH 14/25] ixgb: format all if( to be if ( Jeff Kirsher
2008-07-08 22:52 ` [NET-NEXT PATCH 15/25] ixgb: cleanup space after while Jeff Kirsher
2008-07-08 22:52 ` [NET-NEXT PATCH 16/25] ixgb: whitespace fixups Jeff Kirsher
2008-07-08 22:52 ` [NET-NEXT PATCH 17/25] ixgb: fix spelling errors Jeff Kirsher
2008-07-08 22:52 ` [NET-NEXT PATCH 18/25] ixgb: trivial fix space after for Jeff Kirsher
2008-07-08 22:52 ` [NET-NEXT PATCH 19/25] ixgb: cleanup checkpatch suggestions that are relevant Jeff Kirsher
2008-07-08 22:52 ` [NET-NEXT PATCH 20/25] ixgb: rx cleanup performance improvements Jeff Kirsher
2008-07-08 22:52 ` Jeff Kirsher [this message]
2008-07-08 22:52 ` [NET-NEXT PATCH 22/25] ixgb: audit use of dev_kfree_skb_any Jeff Kirsher
2008-07-08 22:52 ` [NET-NEXT PATCH 23/25] ixgb: cleanup header Jeff Kirsher
2008-07-08 22:53 ` [NET-NEXT PATCH 24/25] ixgb: make NAPI the only option and the default Jeff Kirsher
2008-07-08 22:53 ` [NET-NEXT PATCH 25/25] ixgb: update copyright dates and versions Jeff Kirsher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080708225248.6925.83391.stgit@localhost.localdomain \
    --to=jeffrey.t.kirsher@intel$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=jeff@garzik$(echo .)org \
    --cc=jesse.brandeburg@intel$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox