From: Michal Nazarewicz <mina86@mina86•com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>,
Johannes Berg <johannes.berg@intel•com>,
Emmanuel Grumbach <emmanuel.grumbach@intel•com>,
"John W. Linville" <linville@tuxdriver•com>
Cc: Intel Linux Wireless <ilw@linux•intel.com>,
linux-wireless@vger•kernel.org, netdev@vger•kernel.org,
linux-kernel@vger•kernel.org
Subject: [PATCHv2] net: wireless: iwlwifi: remove minor dead code
Date: Sun, 10 Nov 2013 21:17:56 +0100 [thread overview]
Message-ID: <87iow080zv.fsf@mina86.com> (raw)
In-Reply-To: <527FDB50.1050902@cogentembedded.com>
inta is checked to be zero in a IRQ_NONE branch so afterwards it
cannot be zero as it is never modified.
---
drivers/net/wireless/iwlwifi/pcie/rx.c | 24 +++++++++---------------
1 file changed, 9 insertions(+), 15 deletions(-)
On Sun, Nov 10 2013, Sergei Shtylyov wrote:
> The preferred way of formatting the multi-line comments in the
> networking code is this:
>
> /* bla
> * bla
> */
Works for me. I used /* bla \n * bla */ because this is what the rest
of this function was using.
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c
index 3f237b4..7d0fdc0 100644
--- a/drivers/net/wireless/iwlwifi/pcie/rx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/rx.c
@@ -1121,7 +1121,6 @@ static irqreturn_t iwl_pcie_isr(int irq, void *data)
struct iwl_trans *trans = data;
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
u32 inta, inta_mask;
- irqreturn_t ret = IRQ_NONE;
lockdep_assert_held(&trans_pcie->irq_lock);
@@ -1150,7 +1149,14 @@ static irqreturn_t iwl_pcie_isr(int irq, void *data)
* or due to sporadic interrupts thrown from our NIC. */
if (!inta) {
IWL_DEBUG_ISR(trans, "Ignore interrupt, inta == 0\n");
- goto none;
+ /* re-enable interrupts here since we don't have anything to
+ * service. only Re-enable if disabled by irq and no
+ * schedules tasklet.
+ */
+ if (test_bit(STATUS_INT_ENABLED, &trans_pcie->status) &&
+ !trans_pcie->inta)
+ iwl_enable_interrupts(trans);
+ return IRQ_NONE;
}
if ((inta == 0xFFFFFFFF) || ((inta & 0xFFFFFFF0) == 0xa5a5a5a0)) {
@@ -1168,19 +1174,7 @@ static irqreturn_t iwl_pcie_isr(int irq, void *data)
trans_pcie->inta |= inta;
/* the thread will service interrupts and re-enable them */
- if (likely(inta))
- return IRQ_WAKE_THREAD;
-
- ret = IRQ_HANDLED;
-
-none:
- /* re-enable interrupts here since we don't have anything to service. */
- /* only Re-enable if disabled by irq and no schedules tasklet. */
- if (test_bit(STATUS_INT_ENABLED, &trans_pcie->status) &&
- !trans_pcie->inta)
- iwl_enable_interrupts(trans);
-
- return ret;
+ return IRQ_WAKE_THREAD;
}
/* interrupt handler using ict table, with this interrupt driver will
--
1.8.3.2
next prev parent reply other threads:[~2013-11-10 20:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-10 19:06 [PATCH] net: wireless: iwlwifi: remove minor dead code Michal Nazarewicz
[not found] ` <1384110397-24386-1-git-send-email-mpn-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-11-10 19:15 ` Sergei Shtylyov
2013-11-10 20:17 ` Michal Nazarewicz [this message]
2013-11-11 13:41 ` [PATCHv2] " Johannes Berg
2013-11-11 13:42 ` Johannes Berg
2013-11-12 0:01 ` [PATCHv2.1] " Michal Nazarewicz
[not found] ` <xa1tr4amwkrt.fsf-deATy8a+UHjQT0dZR+AlfA@public.gmane.org>
2013-11-12 5:24 ` Emmanuel Grumbach
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=87iow080zv.fsf@mina86.com \
--to=mina86@mina86$(echo .)com \
--cc=emmanuel.grumbach@intel$(echo .)com \
--cc=ilw@linux$(echo .)intel.com \
--cc=johannes.berg@intel$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-wireless@vger$(echo .)kernel.org \
--cc=linville@tuxdriver$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=sergei.shtylyov@cogentembedded$(echo .)com \
/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