From: Michael Neuling <mikey@neuling.org>
To: Colin King <colin.king@canonical.com>
Cc: linuxppc-dev@lists.ozlabs.org, Ian Munsie <imunsie@au1.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cxl: remove redundant increment of hwirq
Date: Fri, 09 Jan 2015 09:42:01 +1100 [thread overview]
Message-ID: <1420756921.1211.14.camel@neuling.org> (raw)
In-Reply-To: <1420756607-23459-1-git-send-email-colin.king@canonical.com>
On Thu, 2015-01-08 at 22:36 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>=20
> hwirq has not been initialized, however it is being incremented
> and also not being referenced in a loop. This error was detected with
> cppcheck:
>=20
> [drivers/misc/cxl/irq.c:439]: (error) Uninitialized variable: hwirq
>=20
> Commit 80fa93fce37d ("cxl: Name interrupts in /proc/interrupt")=20
> introduced this error.
>=20
> This is a simple fix that removes the redundant increment.
>=20
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Thanks. Looks good.
Acked-By: Michael Neuling <mikey@neuling.org>
> ---
> drivers/misc/cxl/irq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>=20
> 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 co=
unt)
> */
> INIT_LIST_HEAD(&ctx->irq_names);
> for (r =3D 1; r < CXL_IRQ_RANGES; r++) {
> - for (i =3D 0; i < ctx->irqs.range[r]; hwirq++, i++) {
> + for (i =3D 0; i < ctx->irqs.range[r]; i++) {
> irq_name =3D kmalloc(sizeof(struct cxl_irq_name),
> GFP_KERNEL);
> if (!irq_name)
next prev parent reply other threads:[~2015-01-08 22:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 22:36 [PATCH] cxl: remove redundant increment of hwirq Colin King
2015-01-08 22:42 ` Michael Neuling [this message]
2015-01-09 2:20 ` Ian Munsie
-- strict thread matches above, loose matches on Subject: below --
2015-02-01 21:40 Colin King
2015-02-02 1:01 ` Michael Ellerman
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=1420756921.1211.14.camel@neuling.org \
--to=mikey@neuling.org \
--cc=colin.king@canonical.com \
--cc=imunsie@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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).