On 31.05.2009 21:55, Urja Rannikko wrote:
> This fix is simple as in i think it doesnt change the code logic at
> all and doesnt add a level of parentheses (ugly),
> but i can't test as i dont have the necessary hardware.
>
> Index: satasii.c
> ===================================================================
> --- satasii.c (revision 557)
> +++ satasii.c (working copy)
> @@ -64,7 +64,7 @@
>       sii_bar = physmap("SATA SIL registers", addr, 0x100) + reg_offset;
>
>       /* Check if ROM cycle are OK. */
> -     if ((id != 0x0680) && (!(mmio_readl(sii_bar)) & (1 << 26)))
> +     if ((id != 0x0680) && ((!mmio_readl(sii_bar)) & (1 << 26)))
>   

I think the original is ambiguous and the suggested change is incorrect.
Hopefully correct code follows:

        if ((id != 0x0680) && (!(mmio_readl(sii_bar) & (1 << 26))))

The code tries to test if a given bit is not set.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to