diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2016-07-14 04:12:08 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2016-07-14 04:12:08 +0000 |
| commit | 8aab9ff404122b233b4b3c2ac4fc0e30a9104ad9 (patch) | |
| tree | b4c5d0186cf0d9958ebf2b95127eb9876773525d /sys/dev | |
| parent | 7717feca4bc625b11cd167cde35a115f3950cf10 (diff) | |
Use aprint*() instead of printf() in the attach function.
KNF.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/iop_pci.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/dev/pci/iop_pci.c b/sys/dev/pci/iop_pci.c index 7a07ddafafa..e0a8beab5b1 100644 --- a/sys/dev/pci/iop_pci.c +++ b/sys/dev/pci/iop_pci.c @@ -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 @@ iop_pci_attach(device_t parent, device_t self, void *aux) } } if (i == PCI_MAPREG_END) { - printf("can't find mapping\n"); + aprint_error("can't find mapping\n"); return; } @@ -150,7 +150,7 @@ iop_pci_attach(device_t parent, device_t self, void *aux) 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 @@ iop_pci_attach(device_t parent, device_t self, void *aux) #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 @@ iop_pci_attach(device_t parent, device_t self, void *aux) /* 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; } |
