Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/usermode/usermode Only return the result of pmap_ex...



details:   https://anonhg.NetBSD.org/src/rev/826bbe8dc3e8
branches:  trunk
changeset: 768812:826bbe8dc3e8
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Sat Aug 27 17:59:24 2011 +0000

description:
Only return the result of pmap_extract() when the return variable is not NULL.

diffstat:

 sys/arch/usermode/usermode/pmap.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 1dd5b50ca6ad -r 826bbe8dc3e8 sys/arch/usermode/usermode/pmap.c
--- a/sys/arch/usermode/usermode/pmap.c Sat Aug 27 17:57:14 2011 +0000
+++ b/sys/arch/usermode/usermode/pmap.c Sat Aug 27 17:59:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.37 2011/08/26 11:16:50 jmcneill Exp $ */
+/* $NetBSD: pmap.c,v 1.38 2011/08/27 17:59:24 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk <reinoud%NetBSD.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.37 2011/08/26 11:16:50 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.38 2011/08/27 17:59:24 reinoud Exp $");
 
 #include "opt_memsize.h"
 #include "opt_kmempages.h"
@@ -638,7 +638,7 @@
 void
 pmap_remove_all(pmap_t pmap)
 {
-aprint_debug("pmap_remove_all not implemented\n");
+aprint_debug("pmap_remove_all() called\n");
 }
 
 void
@@ -665,7 +665,8 @@
        if (pv == NULL)
                return false;
 
-       *pap = ptoa(pv->pv_ppn);
+       if (pap)
+               *pap = ptoa(pv->pv_ppn);
        return true;
 }
 



Home | Main Index | Thread Index | Old Index