kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] mfd: wm8350: fix a printk
@ 2014-10-29 16:11 Dan Carpenter
  2014-10-29 18:38 ` Charles Keepax
  2014-11-03 12:28 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2014-10-29 16:11 UTC (permalink / raw)
  To: kernel-janitors

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c
index 4ab527f..f5124a8 100644
--- a/drivers/mfd/wm8350-core.c
+++ b/drivers/mfd/wm8350-core.c
@@ -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,

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [patch] mfd: wm8350: fix a printk
  2014-10-29 16:11 [patch] mfd: wm8350: fix a printk Dan Carpenter
@ 2014-10-29 18:38 ` Charles Keepax
  2014-11-03 12:28 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2014-10-29 18:38 UTC (permalink / raw)
  To: kernel-janitors

On Wed, Oct 29, 2014 at 07:11:18PM +0300, Dan Carpenter wrote:
> There is a precedence bug here because >> has higher precedence than &
> so we end up printing the wrong mode.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 

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:

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] mfd: wm8350: fix a printk
  2014-10-29 16:11 [patch] mfd: wm8350: fix a printk Dan Carpenter
  2014-10-29 18:38 ` Charles Keepax
@ 2014-11-03 12:28 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2014-11-03 12:28 UTC (permalink / raw)
  To: kernel-janitors

On Wed, 29 Oct 2014, Charles Keepax wrote:

> On Wed, Oct 29, 2014 at 07:11:18PM +0300, Dan Carpenter wrote:
> > There is a precedence bug here because >> has higher precedence than &
> > so we end up printing the wrong mode.
> > 
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> 
> 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.

> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> 
> Thanks,
> Charles

-- 
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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-03 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-29 16:11 [patch] mfd: wm8350: fix a printk Dan Carpenter
2014-10-29 18:38 ` Charles Keepax
2014-11-03 12:28 ` 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).