Hi,

Le 07/12/2010 18:39, Albert ARIBAUD a écrit :
> Le 07/12/2010 18:10, Prafulla Wadaskar a écrit :
>
>>>> +                       val&= ~MFP_AF_MASK;
>>> Do we need to do this&   here? For val is only 0 here...
>> This can be removed.
> OTOH, with the&, this line makes no assumption about val, and thus will
> work regardless of it. If the&  is removed, and if later val is set to
> non-zero before reaching this instruction, it will cause a bug.
>
> IOW, the&  makes the statement more resilient.
>

If val really is zero then the result will always be zero :(
Simply removing the & would give a different result.
It would be better to remove the whole bloody line ;-)

I haven't followed this thread but I suspect the original code was wrong.

Cheers,
Chris
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to