Skip to contentSkip to conversation

igc: Remove no need declaration of the igc_irq_disable

PATCH New Sasha Neftin 2 participants 2 messages Nov 19, 2019 – Nov 23, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 10/15 igc: Remove no need declaration of the igc_irq_disable

We want to avoid forward-declarations of function if possible. Rearrange the igc_irq_disable function implementation.

---
 drivers/net/ethernet/intel/igc/igc_main.c | 67 +++++++++++++++----------------
 1 file changed, 33 insertions(+), 34 deletions(-)
drivers/net/ethernet/intel/igc/igc_main.c +33 -34
index 4877161f2ea5..f451c90581e5 100644
@@ -57,7 +57,6 @@ static void igc_write_itr(struct igc_q_vector *q_vector);
 static void igc_assign_vector(struct igc_q_vector *q_vector, int msix_vector);
 static void igc_free_q_vector(struct igc_adapter *adapter, int v_idx);
 static void igc_free_q_vectors(struct igc_adapter *adapter);
-static void igc_irq_disable(struct igc_adapter *adapter);
 
 enum latency_range {
 	lowest_latency = 0,
@@ -2266,6 +2265,39 @@ static void igc_irq_enable(struct igc_adapter *adapter)
 }
 
 /**
+ * igc_irq_disable - Mask off interrupt generation on the NIC
+ * @adapter: board private structure
+ */
+static void igc_irq_disable(struct igc_adapter *adapter)
+{
+	struct igc_hw *hw = &adapter->hw;
+
+	if (adapter->msix_entries) {
+		u32 regval = rd32(IGC_EIAM);
+
+		wr32(IGC_EIAM, regval & ~adapter->eims_enable_mask);
+		wr32(IGC_EIMC, adapter->eims_enable_mask);
+		regval = rd32(IGC_EIAC);
+		wr32(IGC_EIAC, regval & ~adapter->eims_enable_mask);
+	}
+
+	wr32(IGC_IAM, 0);
+	wr32(IGC_IMC, ~0);
+	wrfl();
+
+	if (adapter->msix_entries) {
+		int vector = 0, i;
+
+		synchronize_irq(adapter->msix_entries[vector++].vector);
+
+		for (i = 0; i < adapter->num_q_vectors; i++)
+			synchronize_irq(adapter->msix_entries[vector++].vector);
+	} else {
+		synchronize_irq(adapter->pdev->irq);
+	}
+}
+
+/**
  * igc_up - Open the interface and prepare it to handle traffic
  * @adapter: board private structure
  */
@@ -3962,39 +3994,6 @@ static void igc_free_irq(struct igc_adapter *adapter)
 }
 
 /**
- * igc_irq_disable - Mask off interrupt generation on the NIC
- * @adapter: board private structure
- */
-static void igc_irq_disable(struct igc_adapter *adapter)
-{
-	struct igc_hw *hw = &adapter->hw;
-
-	if (adapter->msix_entries) {
-		u32 regval = rd32(IGC_EIAM);
-
-		wr32(IGC_EIAM, regval & ~adapter->eims_enable_mask);
-		wr32(IGC_EIMC, adapter->eims_enable_mask);
-		regval = rd32(IGC_EIAC);
-		wr32(IGC_EIAC, regval & ~adapter->eims_enable_mask);
-	}
-
-	wr32(IGC_IAM, 0);
-	wr32(IGC_IMC, ~0);
-	wrfl();
-
-	if (adapter->msix_entries) {
-		int vector = 0, i;
-
-		synchronize_irq(adapter->msix_entries[vector++].vector);
-
-		for (i = 0; i < adapter->num_q_vectors; i++)
-			synchronize_irq(adapter->msix_entries[vector++].vector);
-	} else {
-		synchronize_irq(adapter->pdev->irq);
-	}
-}
-
-/**
  * igc_request_irq - initialize interrupts
  * @adapter: Pointer to adapter structure
  *
Signature · 1 line
2.11.0
#1 lore raw

PATCH 10/15 igc: Remove no need declaration of the igc_irq_disable

Quoted 7 lines

From: Intel-wired-lan <[email protected]> On Behalf Of Sasha Neftin
Sent: Tuesday, November 19, 2019 3:45 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [PATCH v1 10/15] igc: Remove no need declaration of the igc_irq_disable

Quoted 9 lines

We want to avoid forward-declarations of function if possible. Rearrange the igc_irq_disable function implementation.

---
 drivers/net/ethernet/intel/igc/igc_main.c | 67 +++++++++++++++------------
----
 1 file changed, 33 insertions(+), 34 deletions(-)