lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 20 Dec 2012 23:04:01 +0000 (UTC)
From:	Paul Walmsley <paul@...an.com>
To:	Sasha Levin <sasha.levin@...cle.com>
cc:	Venkatraman S <svenkatr@...com>, t-kristo@...com,
	Chris Ball <cjb@...top.org>, linux-mmc@...r.kernel.org,
	linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mmc: omap_hsmmc: correct precedence of operators

(cc Tero)

Hi,

On Thu, 20 Dec 2012, Sasha Levin wrote:

> With the current code, the condition in the if() doesn't make much sense due to
> precedence of operators.
> 
> Signed-off-by: Sasha Levin <sasha.levin@...cle.com>
> ---
>  drivers/mmc/host/omap_hsmmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index bc58078..3ee2664 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -611,7 +611,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) {

Makes sense to me, but I wonder if this code is even necessary after:

commit 613ad0e98c3596cd2524172fae2a795c3fc57e4a
Author: Tero Kristo <t-kristo@...com>
Date:   Mon Oct 29 22:02:13 2012 -0600

    ARM: OMAP: hwmod: wait for sysreset complete after enabling hwmod
    

?  You might just be able to drop those lines completely now.



- Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists