]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mips: octeon: cvmx-bootmem: Fix compare in "if" statement
authorStefan Roese <sr@denx.de>
Wed, 7 Apr 2021 07:12:28 +0000 (09:12 +0200)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Fri, 23 Apr 2021 19:22:55 +0000 (21:22 +0200)
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>
arch/mips/mach-octeon/cvmx-bootmem.c

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