[U-Boot] clang warning

Nikita Kiryanov nikita at compulab.co.il
Tue Oct 28 13:58:12 CET 2014


Hi Jeroen,

On 28/10/14 01:45, Jeroen Hofstee wrote:
> Hello Nikita,
>
> Commit dc383dd introduces the following clang warning:
>
> drivers/block/dwc_ahsata.c:881:35: warning: use of logical '&&' with
> constant operand [-Wconstant-logical-operand]
>          return readl(&(port_mmio->ssts)) && SATA_PORT_SSTS_DET_MASK;
>                                                                ^
> ~~~~~~~~~~~~~~~~~~~~~~~
> drivers/block/dwc_ahsata.c:881:35: note: use '&' for a bitwise operation
>
> Regards,
> Jeroen

Thanks for catching this. Indeed, this should be a bitwise AND. Patch
coming up.

-- 
Regards,
Nikita Kiryanov


More information about the U-Boot mailing list