Minor: Indentation and braces. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Mon, 30 Jan 2012 14:53:22 +0100
branchstable-1.5
changeset 2289 1c75f52e5c0f
parent 2288 af008c10823b
child 2290 0a6fc3f5f418
Minor: Indentation and braces.
devices/e1000/e1000_main-2.6.37-ethercat.c
--- a/devices/e1000/e1000_main-2.6.37-ethercat.c	Mon Jan 30 14:49:18 2012 +0100
+++ b/devices/e1000/e1000_main-2.6.37-ethercat.c	Mon Jan 30 14:53:22 2012 +0100
@@ -278,8 +278,9 @@
 	int irq_flags = IRQF_SHARED;
 	int err;
 
-	if (adapter->ecdev)
+	if (adapter->ecdev) {
 		return 0;
+	}
 
 	err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name,
 	                  netdev);
@@ -294,8 +295,9 @@
 {
 	struct net_device *netdev = adapter->netdev;
 
-	if (adapter->ecdev)
+	if (adapter->ecdev) {
 		return;
+	}
 
 	free_irq(adapter->pdev->irq, netdev);
 }
@@ -309,8 +311,9 @@
 {
 	struct e1000_hw *hw = &adapter->hw;
 
-	if (adapter->ecdev)
+	if (adapter->ecdev) {
 		return;
+	}
 
 	ew32(IMC, ~0);
 	E1000_WRITE_FLUSH();
@@ -326,8 +329,9 @@
 {
 	struct e1000_hw *hw = &adapter->hw;
 
-	if (adapter->ecdev)
+	if (adapter->ecdev) {
 		return;
+	}
  
 	ew32(IMS, IMS_ENABLE_MASK);
 	E1000_WRITE_FLUSH();
@@ -1933,8 +1937,9 @@
 static void e1000_unmap_and_free_tx_resource(struct e1000_adapter *adapter,
 					     struct e1000_buffer *buffer_info)
 {
-	if (adapter->ecdev)
+	if (adapter->ecdev) {
 		return;
+	}
 
 	if (buffer_info->dma) {
 		if (buffer_info->mapped_as_page)
@@ -2372,10 +2377,13 @@
 
 			adapter->tx_fifo_head = 0;
 			atomic_set(&adapter->tx_fifo_stall, 0);
-			if (!adapter->ecdev) netif_wake_queue(netdev);
+			if (!adapter->ecdev) {
+				netif_wake_queue(netdev);
+			}
 		} else if (!test_bit(__E1000_DOWN, &adapter->flags)) {
-			if (!adapter->ecdev) 
+			if (!adapter->ecdev) {
 				mod_timer(&adapter->tx_fifo_stall_timer, jiffies + 1);
+			}
 		}
 	}
 	rtnl_unlock();
@@ -2550,7 +2558,9 @@
 	ew32(ICS, E1000_ICS_RXDMT0);
 
 	/* Force detection of hung controller every watchdog period */
-	if (!adapter->ecdev) adapter->detect_tx_hung = true;
+	if (!adapter->ecdev) {
+		adapter->detect_tx_hung = true;
+	}
 
 	/* Reset the timer */
 	if (!adapter->ecdev) {
@@ -3110,8 +3120,9 @@
 	tx_ring = adapter->tx_ring;
 
 	if (unlikely(skb->len <= 0)) {
-		if (!adapter->ecdev)
+		if (!adapter->ecdev) {
 			dev_kfree_skb_any(skb);
+		}
 		return NETDEV_TX_OK;
 	}
 
@@ -3238,7 +3249,9 @@
 		}
 
 	} else {
-		if (!adapter->ecdev) dev_kfree_skb_any(skb);
+		if (!adapter->ecdev) {
+			dev_kfree_skb_any(skb);
+		}
 		tx_ring->buffer_info[first].time_stamp = 0;
 		tx_ring->next_to_use = first;
 	}
@@ -3296,8 +3309,9 @@
 	struct e1000_hw *hw = &adapter->hw;
 	int max_frame = new_mtu + ENET_HEADER_SIZE + ETHERNET_FCS_SIZE;
 
-	if (adapter->ecdev)
+	if (adapter->ecdev) {
 		return -EBUSY;
+	}
 
 	if ((max_frame < MINIMUM_ETHERNET_FRAME_SIZE) ||
 	    (max_frame > MAX_JUMBO_FRAME_SIZE)) {
@@ -3385,8 +3399,9 @@
 	if (pci_channel_offline(pdev))
 		return;
 
-	if (!adapter->ecdev)
+	if (!adapter->ecdev) {
 		spin_lock_irqsave(&adapter->stats_lock, flags);
+	}
 
 	/* these counters are modified from e1000_tbi_adjust_stats,
 	 * called from the interrupt context, so they must only
@@ -3514,8 +3529,9 @@
 		adapter->stats.mgpdc += er32(MGTPDC);
 	}
 
-	if (!adapter->ecdev)
+	if (!adapter->ecdev) {
 		spin_unlock_irqrestore(&adapter->stats_lock, flags);
+	}
 }
 
 void ec_poll(struct net_device *netdev)
@@ -3830,7 +3846,9 @@
 
 		status = rx_desc->status;
 		skb = buffer_info->skb;
-		if (!adapter->ecdev) buffer_info->skb = NULL;
+		if (!adapter->ecdev) {
+			buffer_info->skb = NULL;
+		}
 
 		if (++i == rx_ring->count) i = 0;
 		next_rxd = E1000_RX_DESC(*rx_ring, i);
@@ -4047,7 +4065,9 @@
 
 		status = rx_desc->status;
 		skb = buffer_info->skb;
-		if (!adapter->ecdev) buffer_info->skb = NULL;
+		if (!adapter->ecdev) {
+			buffer_info->skb = NULL;
+		}
 
 		prefetch(skb->data - NET_IP_ALIGN);
 
@@ -4485,7 +4505,9 @@
 		data->phy_id = hw->phy_addr;
 		break;
 	case SIOCGMIIREG:
-		if (adapter->ecdev) return -EPERM;
+		if (adapter->ecdev) {
+			return -EPERM;
+		}
 		spin_lock_irqsave(&adapter->stats_lock, flags);
 		if (e1000_read_phy_reg(hw, data->reg_num & 0x1F,
 				   &data->val_out)) {
@@ -4495,7 +4517,9 @@
 		spin_unlock_irqrestore(&adapter->stats_lock, flags);
 		break;
 	case SIOCSMIIREG:
-		if (adapter->ecdev) return -EPERM;
+		if (adapter->ecdev) {
+			return -EPERM;
+		}
 		if (data->reg_num & ~(0x1F))
 			return -EFAULT;
 		mii_reg = data->val_in;
@@ -4736,8 +4760,9 @@
 	int retval = 0;
 #endif
 
-	if (adapter->ecdev)
+	if (adapter->ecdev) {
 		return -EBUSY;
+	}
 
 	netif_device_detach(netdev);
 
@@ -4836,8 +4861,9 @@
 	struct e1000_hw *hw = &adapter->hw;
 	u32 err;
 
-	if (adapter->ecdev)
+	if (adapter->ecdev) {
 		return -EBUSY;
+	}
 
 	pci_set_power_state(pdev, PCI_D0);
 	pci_restore_state(pdev);
@@ -4871,7 +4897,9 @@
 	if (netif_running(netdev))
 		e1000_up(adapter);
 
-	if (!adapter->ecdev) netif_device_attach(netdev);
+	if (!adapter->ecdev) {
+		netif_device_attach(netdev);
+	}
 
 	return 0;
 }