Module Name:    src
Committed By:   jmcneill
Date:           Sat Jun 26 10:43:52 UTC 2021

Modified Files:
        src/sys/dev/fdt: fdt_memory.c

Log Message:
Fix 32-bit build.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/fdt/fdt_memory.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/fdt/fdt_memory.c
diff -u src/sys/dev/fdt/fdt_memory.c:1.2 src/sys/dev/fdt/fdt_memory.c:1.3
--- src/sys/dev/fdt/fdt_memory.c:1.2	Fri Jun 25 08:41:09 2021
+++ src/sys/dev/fdt/fdt_memory.c	Sat Jun 26 10:43:52 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_memory.c,v 1.2 2021/06/25 08:41:09 ryo Exp $ */
+/* $NetBSD: fdt_memory.c,v 1.3 2021/06/26 10:43:52 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "opt_fdt.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.2 2021/06/25 08:41:09 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_memory.c,v 1.3 2021/06/26 10:43:52 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/queue.h>
@@ -110,11 +110,12 @@ void
 fdt_memory_remove_reserved(uint64_t min_addr, uint64_t max_addr)
 {
 	uint64_t lstart = 0, lend = 0;
-	uint64_t addr, size;
 	int index, error, phandle, child;
 
 	const int num = fdt_num_mem_rsv(fdtbus_get_data());
 	for (index = 0; index <= num; index++) {
+		uint64_t addr, size;
+
 		error = fdt_get_mem_rsv(fdtbus_get_data(), index,
 		    &addr, &size);
 		if (error != 0)
@@ -147,6 +148,9 @@ fdt_memory_remove_reserved(uint64_t min_
 	phandle = OF_finddevice("/reserved-memory");
 	if (phandle != -1) {
 		for (child = OF_child(phandle); child; child = OF_peer(child)) {
+			bus_addr_t addr;
+			bus_size_t size;
+
 			if (!of_hasprop(child, "no-map"))
 				continue;
 

Reply via email to