Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LFU-362 cpu: imx8_cpu: fix the mpidr check
CID 22311217 (SolidRun#1 of 1): Operands don't affect result (CONSTANT_EXPRESSION_RESULT) result_independent_of_operands: plat->mpidr == 18446744073709551615UL /* (ulong)-1 */ is always false regardless of the values of its operands. This occurs as the logical operand of if. The mpidr's type is u32, however dev_read_addr returns a value with type fdt_addr_t(phys_addr_t) which is 64bit long. So the check never fail. This patch we still keep mpidr as u32 type, because i.MX8 only has max two cluster, the higher 32bit will always be 0. Use a variable addr to do the check, if check pass, assign the lower 32 bit to plat->mpidr. Reported-by: Coverity Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
- Loading branch information