Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Use aprint*() instead of printf() in the attach ...



details:   https://anonhg.NetBSD.org/src/rev/c89892fec15b
branches:  trunk
changeset: 346462:c89892fec15b
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Jul 14 04:12:08 2016 +0000

description:
Use aprint*() instead of printf() in the attach function.
KNF.

diffstat:

 sys/dev/pci/iop_pci.c |  19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diffs (67 lines):

diff -r 83833fe43afa -r c89892fec15b sys/dev/pci/iop_pci.c
--- a/sys/dev/pci/iop_pci.c     Thu Jul 14 04:01:32 2016 +0000
+++ b/sys/dev/pci/iop_pci.c     Thu Jul 14 04:12:08 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iop_pci.c,v 1.28 2014/03/29 19:28:25 christos Exp $    */
+/*     $NetBSD: iop_pci.c,v 1.29 2016/07/14 04:12:08 msaitoh Exp $     */
 
 /*-
  * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iop_pci.c,v 1.28 2014/03/29 19:28:25 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iop_pci.c,v 1.29 2016/07/14 04:12:08 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -134,7 +134,7 @@
                }
        }
        if (i == PCI_MAPREG_END) {
-               printf("can't find mapping\n");
+               aprint_error("can't find mapping\n");
                return;
        }
 
@@ -150,7 +150,7 @@
            PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DPT_RAID_2005S) {
                i += 4; /* next BAR */
                if (i == PCI_MAPREG_END) {
-                       printf("can't find mapping\n");
+                       aprint_error("can't find mapping\n");
                        return;
                }
 
@@ -161,7 +161,8 @@
 #endif
                if (pci_mapreg_map(pa, i, PCI_MAPREG_TYPE_MEM, 0,
                    &sc->sc_msg_iot, &sc->sc_msg_ioh, NULL, NULL)) {
-                       aprint_error_dev(self, "can't map 2nd register window\n");
+                       aprint_error_dev(self,
+                           "can't map 2nd register window\n");
                        return;
                }
        } else {
@@ -183,16 +184,16 @@
 
        /* Map and establish the interrupt.. */
        if (pci_intr_map(pa, &ih)) {
-               printf("can't map interrupt\n");
+               aprint_error("can't map interrupt\n");
                return;
        }
        intrstr = pci_intr_string(pc, ih, intrbuf, sizeof(intrbuf));
        sc->sc_ih = pci_intr_establish(pc, ih, IPL_BIO, iop_intr, sc);
        if (sc->sc_ih == NULL) {
-               printf("can't establish interrupt");
+               aprint_error("can't establish interrupt");
                if (intrstr != NULL)
-                       printf(" at %s", intrstr);
-               printf("\n");
+                       aprint_error(" at %s", intrstr);
+               aprint_error("\n");
                return;
        }
 



Home | Main Index | Thread Index | Old Index