Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/shark/ofw Fix up OFW_DEBUG printfs, particularly re...



details:   https://anonhg.NetBSD.org/src/rev/f40462f4d322
branches:  trunk
changeset: 822146:f40462f4d322
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sat Mar 04 01:29:27 2017 +0000

description:
Fix up OFW_DEBUG printfs, particularly regarding newlines and error cases.

diffstat:

 sys/arch/shark/ofw/ofw.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 3aa6da6ff609 -r f40462f4d322 sys/arch/shark/ofw/ofw.c
--- a/sys/arch/shark/ofw/ofw.c  Fri Mar 03 21:09:25 2017 +0000
+++ b/sys/arch/shark/ofw/ofw.c  Sat Mar 04 01:29:27 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofw.c,v 1.66 2016/12/22 14:47:59 cherry Exp $  */
+/*     $NetBSD: ofw.c,v 1.67 2017/03/04 01:29:27 jakllsch Exp $        */
 
 /*
  * Copyright 1997
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw.c,v 1.66 2016/12/22 14:47:59 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw.c,v 1.67 2017/03/04 01:29:27 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1755,8 +1755,12 @@
 #endif
        exists = 0;         /* gets set to true if translation exists */
        if (OF_call_method("translate", mmu_ihandle, 1, 3, va, &pa, &mode,
-           &exists) != 0)
+           &exists) != 0) {
+#ifdef OFW_DEBUG
+               printf("(failed)\n");
+#endif
                return(-1);
+       }
 
 #ifdef OFW_DEBUG
        printf("%d %x\n", exists, (uint32_t)pa);
@@ -1771,7 +1775,7 @@
        int mmu_ihandle = ofw_mmu_ihandle();
 
 #ifdef OFW_DEBUG
-       printf("ofw_settranslation (%x, %x, %x, %x) --> void", (uint32_t)va,
+       printf("ofw_settranslation (%x, %x, %x, %x) --> void\n", (uint32_t)va,
            (uint32_t)pa, (uint32_t)size, (uint32_t)mode);
 #endif
        if (OF_call_method("map", mmu_ihandle, 4, 0, pa, va, size, mode) != 0)



Home | Main Index | Thread Index | Old Index