Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jan 2019 21:13:50 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343104 - head/sys/arm/mv
Message-ID:  <201901162113.x0GLDorU010109@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Wed Jan 16 21:13:50 2019
New Revision: 343104
URL: https://svnweb.freebsd.org/changeset/base/343104

Log:
  [mv] Fix invalid condition in fdt_fixup_ranges
  
  Add parentheses to perform assignment before comparison. The prior
  condition worked because fdt_parent_addr_cells returns 1 for the DTB
  on which fdt_fixup_ranges is called and accidentally par_addr_cells
  ends up to be set to the same value.
  
  PR:		210705
  Submitted by:	David Binderman <dcb314@hotmail.com>
  MFC after:	1 week

Modified:
  head/sys/arm/mv/mv_common.c

Modified: head/sys/arm/mv/mv_common.c
==============================================================================
--- head/sys/arm/mv/mv_common.c	Wed Jan 16 20:46:39 2019	(r343103)
+++ head/sys/arm/mv/mv_common.c	Wed Jan 16 21:13:50 2019	(r343104)
@@ -2935,7 +2935,7 @@ fdt_fixup_ranges(phandle_t root)
 	/* Fix-up SoC ranges according to real fdt_immr_pa */
 	if ((node = fdt_find_compatible(root, "simple-bus", 1)) != 0) {
 		if (fdt_addrsize_cells(node, &addr_cells, &size_cells) == 0 &&
-		    (par_addr_cells = fdt_parent_addr_cells(node) <= 2)) {
+		    ((par_addr_cells = fdt_parent_addr_cells(node)) <= 2)) {
 			tuple_size = sizeof(pcell_t) * (par_addr_cells +
 			   addr_cells + size_cells);
 			len = OF_getprop(node, "ranges", ranges,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901162113.x0GLDorU010109>