From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 7 Apr 2021 09:12:28 +0200 Subject: [PATCH v1 02/15] mips: octeon: cvmx-bootmem: Fix compare in "if" statement In-Reply-To: <20210407071241.536752-1-sr@denx.de> References: <20210407071241.536752-1-sr@denx.de> Message-ID: <20210407071241.536752-3-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de While porting from the Marvell source, I introduced a bug by misplacing the parenthesis. This patch fixes this issue. Signed-off-by: Stefan Roese --- arch/mips/mach-octeon/cvmx-bootmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/mips/mach-octeon/cvmx-bootmem.c b/arch/mips/mach-octeon/cvmx-bootmem.c index 4b10effefb7d..12695df9bca6 100644 --- a/arch/mips/mach-octeon/cvmx-bootmem.c +++ b/arch/mips/mach-octeon/cvmx-bootmem.c @@ -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), -- 2.31.1