Module Name: src
Committed By: msaitoh
Date: Thu Jul 14 04:12:08 UTC 2016
Modified Files:
src/sys/dev/pci: iop_pci.c
Log Message:
Use aprint*() instead of printf() in the attach function.
KNF.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pci/iop_pci.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/iop_pci.c
diff -u src/sys/dev/pci/iop_pci.c:1.28 src/sys/dev/pci/iop_pci.c:1.29
--- src/sys/dev/pci/iop_pci.c:1.28 Sat Mar 29 19:28:25 2014
+++ src/sys/dev/pci/iop_pci.c Thu Jul 14 04:12:08 2016
@@ -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
}
}
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
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
#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
/* 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;
}