Skip to contentSkip to conversation

mfd: lp8788-irq: uninitialized variable in irq handler

PATCH In review Dan Carpenter 3 participants 5 messages Mar 11, 2016 – Mar 21, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: lp8788-irq: uninitialized variable in irq handler

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')
drivers/mfd/lp8788-irq.c +1 -1
index c7a9825..792d51b 100644
@@ -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))
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Dan Carpenter

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')

Thanks for catching this!

Quoted 15 lines
drivers/mfd/lp8788-irq.c +1 -1
index c7a9825..792d51b 100644
@@ -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))
#2 lore raw
In reply to Dan Carpenter
Quoted 6 lines · Dan Carpenter

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')

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.

Quoted 13 lines
drivers/mfd/lp8788-irq.c +1 -1
index c7a9825..792d51b 100644
@@ -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))
Signature · 8 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

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

#4 lore raw
Quoted 2 lines · Dan Carpenter

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. ;)

Quoted 4 lines

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.

Signature · 8 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html