Skip to contentSkip to conversation

mfd: wm8350: fix a printk

PATCH In review Dan Carpenter 3 participants 3 messages Oct 29, 2014 – Nov 3, 2014

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

PATCH 1/1 mfd: wm8350: fix a printk

There is a precedence bug here because >> has higher precedence than & so we end up printing the wrong mode.

drivers/mfd/wm8350-core.c +1 -1
index 4ab527f..f5124a8 100644
@@ -308,7 +308,7 @@ int wm8350_device_init(struct wm8350 *wm8350, int irq,
 		goto err;
 	}
 
-	mode = id2 & WM8350_CONF_STS_MASK >> 10;
+	mode = (id2 & WM8350_CONF_STS_MASK) >> 10;
 	cust_id = id2 & WM8350_CUST_ID_MASK;
 	chip_rev = (id2 & WM8350_CHIP_REV_MASK) >> 12;
 	dev_info(wm8350->dev,
#2 lore raw
In reply to Dan Carpenter
Quoted 4 lines · Charles Keepax
Quoted 3 lines · Dan Carpenter

There is a precedence bug here because >> has higher precedence than & so we end up printing the wrong mode.

Quoted 8 lines
Quoted 2 lines

Looks like Joe already been you to the punch on this one:

https://lkml.org/lkml/2014/10/27/36

Although I don't really mind which one Lee applies :-) so:

I'm going to apply Joe's patch.

Quoted 4 lines

Thanks,
Charles

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