mips: octeon: cvmx-bootmem: Fix compare in "if" statement

While porting from the Marvell source, I introduced a bug by misplacing
the parenthesis. This patch fixes this issue.

Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
Stefan Roese 2021-04-07 09:12:28 +02:00 committed by Daniel Schwierzeck
parent 39e0f648d3
commit 2b6a72ed08

View file

@ -283,8 +283,8 @@ static int __cvmx_bootmem_check_version(int exact_match)
int major_version; int major_version;
major_version = CVMX_BOOTMEM_DESC_GET_FIELD(major_version); major_version = CVMX_BOOTMEM_DESC_GET_FIELD(major_version);
if (major_version > 3 || if ((major_version > 3) ||
(exact_match && major_version) != exact_match) { (exact_match && major_version != exact_match)) {
debug("ERROR: Incompatible bootmem descriptor version: %d.%d at addr: 0x%llx\n", debug("ERROR: Incompatible bootmem descriptor version: %d.%d at addr: 0x%llx\n",
major_version, major_version,
(int)CVMX_BOOTMEM_DESC_GET_FIELD(minor_version), (int)CVMX_BOOTMEM_DESC_GET_FIELD(minor_version),