* [patch] mmc: omap_hsmmc: precedence bug in omap_hsmmc_context_restore()
@ 2013-08-22 12:56 Dan Carpenter
2013-08-22 14:46 ` Balaji T K
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2013-08-22 12:56 UTC (permalink / raw)
To: Balaji T K
Cc: Chris Ball, Grant Likely, Rob Herring, linux-mmc, linux-omap,
devicetree, kernel-janitors
'!' 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.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
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;
if (host->pdata->controller_flags & OMAP_HSMMC_SUPPORTS_DUAL_VOLT) {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] mmc: omap_hsmmc: precedence bug in omap_hsmmc_context_restore()
2013-08-22 12:56 [patch] mmc: omap_hsmmc: precedence bug in omap_hsmmc_context_restore() Dan Carpenter
@ 2013-08-22 14:46 ` Balaji T K
2014-01-30 12:15 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Balaji T K @ 2013-08-22 14:46 UTC (permalink / raw)
To: Dan Carpenter
Cc: Chris Ball, Grant Likely, Rob Herring, linux-mmc, linux-omap,
devicetree, kernel-janitors
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 ...
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] mmc: omap_hsmmc: precedence bug in omap_hsmmc_context_restore()
2013-08-22 14:46 ` Balaji T K
@ 2014-01-30 12:15 ` Dan Carpenter
2014-01-30 13:04 ` Balaji T K
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2014-01-30 12:15 UTC (permalink / raw)
To: Balaji T K
Cc: Chris Ball, Grant Likely, Rob Herring, linux-mmc, linux-omap,
devicetree, kernel-janitors
On Thu, Aug 22, 2013 at 08:16:28PM +0530, Balaji T K wrote:
> 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 ...
>
> >Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >---
> >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.
What happened with this?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] mmc: omap_hsmmc: precedence bug in omap_hsmmc_context_restore()
2014-01-30 12:15 ` Dan Carpenter
@ 2014-01-30 13:04 ` Balaji T K
0 siblings, 0 replies; 4+ messages in thread
From: Balaji T K @ 2014-01-30 13:04 UTC (permalink / raw)
To: Dan Carpenter
Cc: Chris Ball, Grant Likely, Rob Herring, linux-mmc, linux-omap,
devicetree, kernel-janitors
On Thursday 30 January 2014 05:45 PM, Dan Carpenter wrote:
> On Thu, Aug 22, 2013 at 08:16:28PM +0530, Balaji T K wrote:
>> 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 ...
>>
>>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>> ---
>>> 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.
>
> What happened with this?
My bad, I missed it, will fix it.
Thanks and Regards,
Balaji T K
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-30 13:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22 12:56 [patch] mmc: omap_hsmmc: precedence bug in omap_hsmmc_context_restore() Dan Carpenter
2013-08-22 14:46 ` Balaji T K
2014-01-30 12:15 ` Dan Carpenter
2014-01-30 13:04 ` Balaji T K
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).