[PATCH 2/4] sata: ahsata: Fix wrong operand for checking SERR DIAG_X

Simon Glass sjg at chromium.org
Mon May 4 16:17:49 CEST 2020


On Sun, 3 May 2020 at 08:04, Peng Fan <peng.fan at nxp.com> wrote:
>
> From: Ye Li <ye.li at nxp.com>
>
> Fix coverity issue CID 3261683: Wrong operator used
> (CONSTANT_EXPRESSION_RESULT) operator_confusion:
> ({...; __v;}) | 67108864 is always 1/true regardless of the values
> of its operand. This occurs as the logical operand of !
>
> When DIAG_X is set, the PHY COMINIT signal is detected, so
> should use '&' to check whether it is set.
>
> Signed-off-by: Ye Li <ye.li at nxp.com>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> ---
>  drivers/ata/dwc_ahsata.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list