diff options
author | Michal Nazarewicz <mina86@mina86.com> | 2013-11-10 14:06:37 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-12-09 15:29:05 -0500 |
commit | 84c317c9b09f757b4c4a4fb38549ac54d1559419 (patch) | |
tree | e57fbd39a2a39b7b99e0daa95f4c56d2f060d347 | |
parent | 8c21c5386d6e9404b347acf5b13db61ca7b5e037 (diff) |
iwlwifi: pcie: remove minor dead code
inta is checked to be zero in a IRQ_NONE branch so afterwards it
cannot be zero as it is never modified.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
[reword the patch title and fix comment]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/rx.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index be3995afa9d0..1d6bf7b98e2d 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
@@ -1126,7 +1126,6 @@ static irqreturn_t iwl_pcie_isr(int irq, void *data) | |||
1126 | struct iwl_trans *trans = data; | 1126 | struct iwl_trans *trans = data; |
1127 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 1127 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
1128 | u32 inta, inta_mask; | 1128 | u32 inta, inta_mask; |
1129 | irqreturn_t ret = IRQ_NONE; | ||
1130 | 1129 | ||
1131 | lockdep_assert_held(&trans_pcie->irq_lock); | 1130 | lockdep_assert_held(&trans_pcie->irq_lock); |
1132 | 1131 | ||
@@ -1155,7 +1154,16 @@ static irqreturn_t iwl_pcie_isr(int irq, void *data) | |||
1155 | * or due to sporadic interrupts thrown from our NIC. */ | 1154 | * or due to sporadic interrupts thrown from our NIC. */ |
1156 | if (!inta) { | 1155 | if (!inta) { |
1157 | IWL_DEBUG_ISR(trans, "Ignore interrupt, inta == 0\n"); | 1156 | IWL_DEBUG_ISR(trans, "Ignore interrupt, inta == 0\n"); |
1158 | goto none; | 1157 | /* |
1158 | * Re-enable interrupts here since we don't have anything to | ||
1159 | * service, but only in case the handler won't run. Note that | ||
1160 | * the handler can be scheduled because of a previous | ||
1161 | * interrupt. | ||
1162 | */ | ||
1163 | if (test_bit(STATUS_INT_ENABLED, &trans_pcie->status) && | ||
1164 | !trans_pcie->inta) | ||
1165 | iwl_enable_interrupts(trans); | ||
1166 | return IRQ_NONE; | ||
1159 | } | 1167 | } |
1160 | 1168 | ||
1161 | if ((inta == 0xFFFFFFFF) || ((inta & 0xFFFFFFF0) == 0xa5a5a5a0)) { | 1169 | if ((inta == 0xFFFFFFFF) || ((inta & 0xFFFFFFF0) == 0xa5a5a5a0)) { |
@@ -1173,19 +1181,7 @@ static irqreturn_t iwl_pcie_isr(int irq, void *data) | |||
1173 | 1181 | ||
1174 | trans_pcie->inta |= inta; | 1182 | trans_pcie->inta |= inta; |
1175 | /* the thread will service interrupts and re-enable them */ | 1183 | /* the thread will service interrupts and re-enable them */ |
1176 | if (likely(inta)) | 1184 | return IRQ_WAKE_THREAD; |
1177 | return IRQ_WAKE_THREAD; | ||
1178 | |||
1179 | ret = IRQ_HANDLED; | ||
1180 | |||
1181 | none: | ||
1182 | /* re-enable interrupts here since we don't have anything to service. */ | ||
1183 | /* only Re-enable if disabled by irq and no schedules tasklet. */ | ||
1184 | if (test_bit(STATUS_INT_ENABLED, &trans_pcie->status) && | ||
1185 | !trans_pcie->inta) | ||
1186 | iwl_enable_interrupts(trans); | ||
1187 | |||
1188 | return ret; | ||
1189 | } | 1185 | } |
1190 | 1186 | ||
1191 | /* interrupt handler using ict table, with this interrupt driver will | 1187 | /* interrupt handler using ict table, with this interrupt driver will |