* [patch] mfd: lp8788-irq: uninitialized variable in irq handler
@ 2016-03-11 8:11 Dan Carpenter
2016-03-13 23:08 ` Kim, Milo
2016-03-21 11:54 ` Lee Jones
0 siblings, 2 replies; 5+ messages in thread
From: Dan Carpenter @ 2016-03-11 8:11 UTC (permalink / raw)
To: Milo Kim; +Cc: Lee Jones, linux-kernel, kernel-janitors
Instead to being true/false, the "handled" is true/uninitialized.
Presumably this doesn't cause that many problems in real life because
normally we handle the IRQ.
Fixes: eea6b7cc53aa ('mfd: Add lp8788 mfd driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/mfd/lp8788-irq.c b/drivers/mfd/lp8788-irq.c
index c7a9825..792d51b 100644
--- a/drivers/mfd/lp8788-irq.c
+++ b/drivers/mfd/lp8788-irq.c
@@ -112,7 +112,7 @@ static irqreturn_t lp8788_irq_handler(int irq, void *ptr)
struct lp8788_irq_data *irqd = ptr;
struct lp8788 *lp = irqd->lp;
u8 status[NUM_REGS], addr, mask;
- bool handled;
+ bool handled = false;
int i;
if (lp8788_read_multi_bytes(lp, LP8788_INT_1, status, NUM_REGS))
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [patch] mfd: lp8788-irq: uninitialized variable in irq handler
2016-03-11 8:11 [patch] mfd: lp8788-irq: uninitialized variable in irq handler Dan Carpenter
@ 2016-03-13 23:08 ` Kim, Milo
2016-03-21 11:54 ` Lee Jones
1 sibling, 0 replies; 5+ messages in thread
From: Kim, Milo @ 2016-03-13 23:08 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Lee Jones, linux-kernel, kernel-janitors
On 3/11/2016 5:11 PM, Dan Carpenter wrote:
> Instead to being true/false, the "handled" is true/uninitialized.
> Presumably this doesn't cause that many problems in real life because
> normally we handle the IRQ.
>
> Fixes: eea6b7cc53aa ('mfd: Add lp8788 mfd driver')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Milo Kim <milo.kim@ti.com>
Thanks for catching this!
>
> diff --git a/drivers/mfd/lp8788-irq.c b/drivers/mfd/lp8788-irq.c
> index c7a9825..792d51b 100644
> --- a/drivers/mfd/lp8788-irq.c
> +++ b/drivers/mfd/lp8788-irq.c
> @@ -112,7 +112,7 @@ static irqreturn_t lp8788_irq_handler(int irq, void *ptr)
> struct lp8788_irq_data *irqd = ptr;
> struct lp8788 *lp = irqd->lp;
> u8 status[NUM_REGS], addr, mask;
> - bool handled;
> + bool handled = false;
> int i;
>
> if (lp8788_read_multi_bytes(lp, LP8788_INT_1, status, NUM_REGS))
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] mfd: lp8788-irq: uninitialized variable in irq handler
2016-03-11 8:11 [patch] mfd: lp8788-irq: uninitialized variable in irq handler Dan Carpenter
2016-03-13 23:08 ` Kim, Milo
@ 2016-03-21 11:54 ` Lee Jones
2016-03-21 12:30 ` Dan Carpenter
1 sibling, 1 reply; 5+ messages in thread
From: Lee Jones @ 2016-03-21 11:54 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Milo Kim, linux-kernel, kernel-janitors
On Fri, 11 Mar 2016, Dan Carpenter wrote:
> Instead to being true/false, the "handled" is true/uninitialized.
> Presumably this doesn't cause that many problems in real life because
> normally we handle the IRQ.
>
> Fixes: eea6b7cc53aa ('mfd: Add lp8788 mfd driver')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
I've fixed the $SUBJECT line to be more consistent with the subsystem
style for you this time. Please pay more attention to that in the
future.
`git log --oneline -- $SUBSYSTEM` helps with this.
[I think I recall a conversation with you about this before, and you
said it was part of your submission process?]
Patch applied, thanks.
> diff --git a/drivers/mfd/lp8788-irq.c b/drivers/mfd/lp8788-irq.c
> index c7a9825..792d51b 100644
> --- a/drivers/mfd/lp8788-irq.c
> +++ b/drivers/mfd/lp8788-irq.c
> @@ -112,7 +112,7 @@ static irqreturn_t lp8788_irq_handler(int irq, void *ptr)
> struct lp8788_irq_data *irqd = ptr;
> struct lp8788 *lp = irqd->lp;
> u8 status[NUM_REGS], addr, mask;
> - bool handled;
> + bool handled = false;
> int i;
>
> if (lp8788_read_multi_bytes(lp, LP8788_INT_1, status, NUM_REGS))
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] mfd: lp8788-irq: uninitialized variable in irq handler
2016-03-21 11:54 ` Lee Jones
@ 2016-03-21 12:30 ` Dan Carpenter
2016-03-21 18:50 ` Lee Jones
0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2016-03-21 12:30 UTC (permalink / raw)
To: Lee Jones; +Cc: Milo Kim, linux-kernel, kernel-janitors
Gar, the truth is I'm never going to remember to capitalize patches for
you. No one else has that rule. Plus the last two times we had this
discussion the patches I was fixing were not capitalized either.
git log -p --author="Dan Carpenter" drivers/mfd | grep Fixes | head -n 2
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] mfd: lp8788-irq: uninitialized variable in irq handler
2016-03-21 12:30 ` Dan Carpenter
@ 2016-03-21 18:50 ` Lee Jones
0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2016-03-21 18:50 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Milo Kim, linux-kernel, kernel-janitors
On Mon, 21 Mar 2016, Dan Carpenter wrote:
> Gar, the truth is I'm never going to remember to capitalize patches for
> you. No one else has that rule. Plus the last two times we had this
It's an awesome rule. Everyone should have that rule. ;)
> discussion the patches I was fixing were not capitalized either.
>
> git log -p --author="Dan Carpenter" drivers/mfd | grep Fixes | head
> -n 2
Not sure what you think the output of this command is meant to show,
but I get this:
$ git log -p --author="Dan Carpenter" drivers/mfd | grep Fixes | head -n 2
Fixes: c013f0a56c56 ('mfd: Add pm8xxx irq support')
... which seems to go against your statement.
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-03-21 19:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-11 8:11 [patch] mfd: lp8788-irq: uninitialized variable in irq handler Dan Carpenter
2016-03-13 23:08 ` Kim, Milo
2016-03-21 11:54 ` Lee Jones
2016-03-21 12:30 ` Dan Carpenter
2016-03-21 18:50 ` Lee Jones
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).