Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb do not abuse aprint_error for runtime error mess...
details: https://anonhg.NetBSD.org/src/rev/c43f39f35ddc
branches: trunk
changeset: 995168:c43f39f35ddc
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Mon Dec 10 14:32:04 2018 +0000
description:
do not abuse aprint_error for runtime error messages
diffstat:
sys/dev/usb/uchcom.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diffs (105 lines):
diff -r e18692c132c2 -r c43f39f35ddc sys/dev/usb/uchcom.c
--- a/sys/dev/usb/uchcom.c Mon Dec 10 14:16:28 2018 +0000
+++ b/sys/dev/usb/uchcom.c Mon Dec 10 14:32:04 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uchcom.c,v 1.21 2018/12/10 14:16:28 jakllsch Exp $ */
+/* $NetBSD: uchcom.c,v 1.22 2018/12/10 14:32:04 jakllsch Exp $ */
/*
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.21 2018/12/10 14:16:28 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.22 2018/12/10 14:32:04 jakllsch Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -565,7 +565,7 @@
err = get_version(sc, &sc->sc_version);
if (err) {
- aprint_error_dev(sc->sc_dev, "cannot get version: %s\n",
+ device_printf(sc->sc_dev, "cannot get version: %s\n",
usbd_errstr(err));
return EIO;
}
@@ -592,7 +592,7 @@
err = get_status(sc, &cur);
if (err) {
- aprint_error_dev(sc->sc_dev,
+ device_printf(sc->sc_dev,
"cannot update status: %s\n", usbd_errstr(err));
return EIO;
}
@@ -617,7 +617,7 @@
err = set_dtrrts_20(sc, ~val);
if (err) {
- aprint_error_dev(sc->sc_dev, "cannot set DTR/RTS: %s\n",
+ device_printf(sc->sc_dev, "cannot set DTR/RTS: %s\n",
usbd_errstr(err));
return EIO;
}
@@ -705,7 +705,7 @@
(err = write_reg(sc,
UCHCOM_REG_BPS_MOD, dv.dv_mod,
UCHCOM_REG_BPS_PAD, 0))) {
- aprint_error_dev(sc->sc_dev, "cannot set DTE rate: %s\n",
+ device_printf(sc->sc_dev, "cannot set DTE rate: %s\n",
usbd_errstr(err));
return EIO;
}
@@ -722,7 +722,7 @@
err = read_reg(sc, UCHCOM_REG_LCR1, &lcr1val, UCHCOM_REG_LCR2, &lcr2val);
if (err) {
- aprint_error_dev(sc->sc_dev, "cannot get LCR: %s\n",
+ device_printf(sc->sc_dev, "cannot get LCR: %s\n",
usbd_errstr(err));
return EIO;
}
@@ -758,7 +758,7 @@
err = write_reg(sc, UCHCOM_REG_LCR1, lcr1val, UCHCOM_REG_LCR2, lcr2val);
if (err) {
- aprint_error_dev(sc->sc_dev, "cannot set LCR: %s\n",
+ device_printf(sc->sc_dev, "cannot set LCR: %s\n",
usbd_errstr(err));
return EIO;
}
@@ -775,7 +775,7 @@
DPRINTF(("%s: clear\n", device_xname(sc->sc_dev)));
err = generic_control_out(sc, UCHCOM_REQ_RESET, 0, 0);
if (err) {
- aprint_error_dev(sc->sc_dev, "cannot clear: %s\n",
+ device_printf(sc->sc_dev, "cannot clear: %s\n",
usbd_errstr(err));
return EIO;
}
@@ -884,7 +884,7 @@
sc->sc_intr_size,
uchcom_intr, USBD_DEFAULT_INTERVAL);
if (err) {
- aprint_error_dev(sc->sc_dev,
+ device_printf(sc->sc_dev,
"cannot open interrupt pipe: %s\n",
usbd_errstr(err));
return EIO;
@@ -904,12 +904,12 @@
if (sc->sc_intr_pipe != NULL) {
err = usbd_abort_pipe(sc->sc_intr_pipe);
if (err)
- aprint_error_dev(sc->sc_dev,
+ device_printf(sc->sc_dev,
"abort interrupt pipe failed: %s\n",
usbd_errstr(err));
err = usbd_close_pipe(sc->sc_intr_pipe);
if (err)
- aprint_error_dev(sc->sc_dev,
+ device_printf(sc->sc_dev,
"close interrupt pipe failed: %s\n",
usbd_errstr(err));
kmem_free(sc->sc_intr_buf, sc->sc_intr_size);
Home |
Main Index |
Thread Index |
Old Index