Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb reduce aprint_error(9) abuse



details:   https://anonhg.NetBSD.org/src/rev/20c794dc4ded
branches:  trunk
changeset: 953224:20c794dc4ded
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Mon Mar 01 17:41:00 2021 +0000

description:
reduce aprint_error(9) abuse

diffstat:

 sys/dev/usb/if_axe.c |  10 +++++-----
 sys/dev/usb/usbnet.c |  12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)

diffs (97 lines):

diff -r 6bd5f6808f8f -r 20c794dc4ded sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c      Mon Mar 01 16:50:01 2021 +0000
+++ b/sys/dev/usb/if_axe.c      Mon Mar 01 17:41:00 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_axe.c,v 1.131 2020/03/27 18:04:45 nisimura Exp $    */
+/*     $NetBSD: if_axe.c,v 1.132 2021/03/01 17:41:00 jakllsch Exp $    */
 /*     $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
 
 /*
@@ -87,7 +87,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.131 2020/03/27 18:04:45 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.132 2021/03/01 17:41:00 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -335,7 +335,7 @@
        axe_cmd(sc, AXE_CMD_MII_OPMODE_HW, 0, 0, NULL);
 
        if (err) {
-               aprint_error_dev(un->un_dev, "read PHY failed\n");
+               device_printf(un->un_dev, "read PHY failed\n");
                return EIO;
        }
 
@@ -422,7 +422,7 @@
        DPRINTF("val=%#jx", val, 0, 0, 0);
        err = axe_cmd(sc, AXE_CMD_WRITE_MEDIA, 0, val, NULL);
        if (err)
-               aprint_error_dev(un->un_dev, "media change failed\n");
+               device_printf(un->un_dev, "media change failed\n");
 }
 
 static void
@@ -442,7 +442,7 @@
                return;
 
        if (axe_cmd(sc, AXE_CMD_RXCTL_READ, 0, 0, &rxmode)) {
-               aprint_error_dev(un->un_dev, "can't read rxmode");
+               device_printf(un->un_dev, "can't read rxmode");
                return;
        }
        rxmode = le16toh(rxmode);
diff -r 6bd5f6808f8f -r 20c794dc4ded sys/dev/usb/usbnet.c
--- a/sys/dev/usb/usbnet.c      Mon Mar 01 16:50:01 2021 +0000
+++ b/sys/dev/usb/usbnet.c      Mon Mar 01 17:41:00 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbnet.c,v 1.39 2020/08/28 17:05:32 riastradh Exp $    */
+/*     $NetBSD: usbnet.c,v 1.40 2021/03/01 17:41:44 jakllsch Exp $     */
 
 /*
  * Copyright (c) 2019 Matthew R. Green
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.39 2020/08/28 17:05:32 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbnet.c,v 1.40 2021/03/01 17:41:44 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -350,7 +350,7 @@
 
        if (status != USBD_NORMAL_COMPLETION) {
                if (usbd_ratecheck(&unp->unp_rx_notice))
-                       aprint_error_dev(un->un_dev, "usb errors on rx: %s\n",
+                       device_printf(un->un_dev, "usb errors on rx: %s\n",
                            usbd_errstr(status));
                if (status == USBD_STALLED)
                        usbd_clear_endpoint_stall_async(unp->unp_ep[USBNET_ENDPT_RX]);
@@ -422,7 +422,7 @@
 
                if_statinc(ifp, if_oerrors);
                if (usbd_ratecheck(&unp->unp_tx_notice))
-                       aprint_error_dev(un->un_dev, "usb error on tx: %s\n",
+                       device_printf(un->un_dev, "usb error on tx: %s\n",
                            usbd_errstr(status));
                if (status == USBD_STALLED)
                        usbd_clear_endpoint_stall_async(unp->unp_ep[USBNET_ENDPT_TX]);
@@ -1139,13 +1139,13 @@
        usbd_status err;
 
        if_statinc(ifp, if_oerrors);
-       aprint_error_dev(un->un_dev, "watchdog timeout\n");
+       device_printf(un->un_dev, "watchdog timeout\n");
 
        if (cd->uncd_tx_cnt > 0) {
                DPRINTF("uncd_tx_cnt=%ju non zero, aborting pipe", 0, 0, 0, 0);
                err = usbd_abort_pipe(unp->unp_ep[USBNET_ENDPT_TX]);
                if (err)
-                       aprint_error_dev(un->un_dev, "pipe abort failed: %s\n",
+                       device_printf(un->un_dev, "pipe abort failed: %s\n",
                            usbd_errstr(err));
                if (cd->uncd_tx_cnt != 0)
                        DPRINTF("uncd_tx_cnt now %ju", cd->uncd_tx_cnt, 0, 0, 0);



Home | Main Index | Thread Index | Old Index