Thread (4 messages) 4 messages, 2 authors, 2014-01-30

Re: [patch] mmc: omap_hsmmc: precedence bug in omap_hsmmc_context_restore()

From: Balaji T K <hidden>
Date: 2013-08-22 14:46:38
Also in: kernel-janitors, linux-mmc, linux-omap

On Thursday 22 August 2013 06:26 PM, Dan Carpenter wrote:
'!' has higher precedence than '&' so this doesn't work as intended
although since RESETDONE is 1 it would work if none of the other bits
are set.
Hi Dan,

Thanks for the patch, Indeed other bits are reserved.
however ...
quoted hunk ↗ jump to hunk
Signed-off-by: Dan Carpenter <redacted>
---
Untested.
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 1865321..7346b15 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -612,7 +612,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host)
  	if (host->context_loss == context_loss)
  		return 1;

-	if (!OMAP_HSMMC_READ(host->base, SYSSTATUS) & RESETDONE)
+	if (!(OMAP_HSMMC_READ(host->base, SYSSTATUS) & RESETDONE))
  		return 1;
This check is unnecessary, will send a patch to remove this.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help