Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/fdt Fix 32-bit build.



details:   https://anonhg.NetBSD.org/src/rev/1fbc97eaf93d
branches:  trunk
changeset: 379908:1fbc97eaf93d
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Jun 26 10:43:52 2021 +0000

description:
Fix 32-bit build.

diffstat:

 sys/dev/fdt/fdt_memory.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r 6ec2f4d86ec9 -r 1fbc97eaf93d sys/dev/fdt/fdt_memory.c
--- a/sys/dev/fdt/fdt_memory.c  Sat Jun 26 09:29:14 2021 +0000
+++ b/sys/dev/fdt/fdt_memory.c  Sat Jun 26 10:43:52 2021 +0000
@@ -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;
 



Home | Main Index | Thread Index | Old Index