From: Colin King <colin.king@canonical.com>
To: Ian Munsie <imunsie@au1.ibm.com>,
Michael Neuling <mikey@neuling.org>,
linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] cxl: remove redundant increment of hwirq
Date: Sun, 1 Feb 2015 21:40:08 +0000 [thread overview]
Message-ID: <1422826808-31363-1-git-send-email-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
Recent commit 80fa93fce37d3490f
("cxl: Name interrupts in /proc/interrupt") introduced a
redundant increment of hwirq which is not used or even
initialised at the point it is incremented. Detected by
cppcheck:
[drivers/misc/cxl/irq.c:439]: (error) Uninitialized
variable: hwirq
Simple fix, remove the redundant increment.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/misc/cxl/irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/cxl/irq.c b/drivers/misc/cxl/irq.c
index c294925..68ab608 100644
--- a/drivers/misc/cxl/irq.c
+++ b/drivers/misc/cxl/irq.c
@@ -436,7 +436,7 @@ int afu_register_irqs(struct cxl_context *ctx, u32 count)
*/
INIT_LIST_HEAD(&ctx->irq_names);
for (r = 1; r < CXL_IRQ_RANGES; r++) {
- for (i = 0; i < ctx->irqs.range[r]; hwirq++, i++) {
+ for (i = 0; i < ctx->irqs.range[r]; i++) {
irq_name = kmalloc(sizeof(struct cxl_irq_name),
GFP_KERNEL);
if (!irq_name)
--
2.1.4
next reply other threads:[~2015-02-01 21:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-01 21:40 Colin King [this message]
2015-02-02 1:01 ` [PATCH] cxl: remove redundant increment of hwirq Michael Ellerman
-- strict thread matches above, loose matches on Subject: below --
2015-01-08 22:36 Colin King
2015-01-08 22:42 ` Michael Neuling
2015-01-09 2:20 ` Ian Munsie
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=1422826808-31363-1-git-send-email-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=imunsie@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).