Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/fdt be more verbose about errors.



details:   https://anonhg.NetBSD.org/src/rev/f8e637eb3e25
branches:  trunk
changeset: 1004851:f8e637eb3e25
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sat Nov 16 21:53:38 2019 +0000

description:
be more verbose about errors.

diffstat:

 sys/dev/fdt/fdt_intr.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 07790e11fa3e -r f8e637eb3e25 sys/dev/fdt/fdt_intr.c
--- a/sys/dev/fdt/fdt_intr.c    Sat Nov 16 21:41:02 2019 +0000
+++ b/sys/dev/fdt/fdt_intr.c    Sat Nov 16 21:53:38 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_intr.c,v 1.22 2019/06/14 11:08:18 hkenken Exp $ */
+/* $NetBSD: fdt_intr.c,v 1.23 2019/11/16 21:53:38 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 2015-2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.22 2019/06/14 11:08:18 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_intr.c,v 1.23 2019/11/16 21:53:38 mlelstv Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -138,8 +138,10 @@
        int ihandle;
 
        specifier = get_specifier_by_index(phandle, index, &ihandle);
-       if (specifier == NULL)
+       if (specifier == NULL) {
+               printf("%s: handle not found %u@%x\n",__func__,index,phandle);
                return NULL;
+       }
 
        return fdtbus_intr_establish_raw(ihandle, specifier, ipl,
            flags, func, arg);
@@ -168,8 +170,10 @@
        void *ih;
 
        ic = fdtbus_get_interrupt_controller(ihandle);
-       if (ic == NULL)
+       if (ic == NULL) {
+               printf("%s: ihandle %d is not a controller\n",__func__,ihandle);
                return NULL;
+       }
 
        ih = ic->ic_funcs->establish(ic->ic_dev, __UNCONST(specifier),
            ipl, flags, func, arg);



Home | Main Index | Thread Index | Old Index