Skip to contentSkip to conversation

wrapper: Use the child-bus #address-cells to decide which range entry to use

PATCH New Scott Wood 1 participant 1 message Dec 19, 2008 PowerPC

lore
Share & tools
lore

Scott Wood

author
#0 lore raw

PATCH 1/1 wrapper: Use the child-bus #address-cells to decide which range entry to use

The correct #address-cells was still used for the actual translation, so the impact is only a possibility of choosing the wrong range entry or failing to find any match. Most common cases were not affected.

---
 arch/powerpc/boot/devtree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/boot/devtree.c +1 -1
index 5d12336..a7e21a3 100644
@@ -213,7 +213,7 @@ static int find_range(u32 *reg, u32 *ranges, int nregaddr,
 		u32 range_addr[MAX_ADDR_CELLS];
 		u32 range_size[MAX_ADDR_CELLS];
 
-		copy_val(range_addr, ranges + i, naddr);
+		copy_val(range_addr, ranges + i, nregaddr);
 		copy_val(range_size, ranges + i + nregaddr + naddr, nsize);
 
 		if (compare_reg(reg, range_addr, range_size))
Signature · 1 line
1.5.6.rc1.6.gc53ad.dirty