Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Correct abuses of aprint_error_dev(9).



details:   https://anonhg.NetBSD.org/src/rev/ce3630d67e4a
branches:  trunk
changeset: 446293:ce3630d67e4a
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Thu Nov 29 18:53:42 2018 +0000

description:
Correct abuses of aprint_error_dev(9).

diffstat:

 sys/dev/usb/if_run.c |  22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diffs (96 lines):

diff -r f04054421043 -r ce3630d67e4a sys/dev/usb/if_run.c
--- a/sys/dev/usb/if_run.c      Thu Nov 29 17:40:12 2018 +0000
+++ b/sys/dev/usb/if_run.c      Thu Nov 29 18:53:42 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_run.c,v 1.30 2018/09/12 21:57:18 christos Exp $     */
+/*     $NetBSD: if_run.c,v 1.31 2018/11/29 18:53:42 jakllsch Exp $     */
 /*     $OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $ */
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.30 2018/09/12 21:57:18 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.31 2018/11/29 18:53:42 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -638,7 +638,7 @@
        /* retrieve RF rev. no and various other things from EEPROM */
        run_read_eeprom(sc);
 
-       aprint_error_dev(sc->sc_dev,
+       aprint_verbose_dev(sc->sc_dev,
            "MAC/BBP RT%04X (rev 0x%04X), RF %s (MIMO %dT%dR), address %s\n",
            sc->mac_ver, sc->mac_rev, run_get_rf(sc->rf_rev), sc->ntxchains,
            sc->nrxchains, ether_sprintf(ic->ic_myaddr));
@@ -915,12 +915,12 @@
                fwname = "run-rt2870";
 
        if ((error = firmware_load("run", fwname, &ucode, &size)) != 0) {
-               aprint_error_dev(sc->sc_dev,
+               device_printf(sc->sc_dev,
                    "error %d, could not read firmware %s\n", error, fwname);
                return error;
        }
        if (size != 4096) {
-               aprint_error_dev(sc->sc_dev,
+               device_printf(sc->sc_dev,
                    "invalid firmware size (should be 4KB)\n");
                firmware_free(ucode, size);
                return EINVAL;
@@ -955,7 +955,7 @@
                usbd_delay_ms(sc->sc_udev, 10);
        }
        if (ntries == 1000) {
-               aprint_error_dev(sc->sc_dev,
+               device_printf(sc->sc_dev,
                    "timeout waiting for MCU to initialize\n");
                return ETIMEDOUT;
        }
@@ -2646,7 +2646,7 @@
 
        if (sc->sc_tx_timer > 0) {
                if (--sc->sc_tx_timer == 0) {
-                       aprint_error_dev(sc->sc_dev, "device timeout\n");
+                       device_printf(sc->sc_dev, "device timeout\n");
                        /* run_init(ifp); XXX needs a process context! */
                        ifp->if_oerrors++;
                        return;
@@ -4516,7 +4516,7 @@
 
        if ((sc->sc_flags & RUN_FWLOADED) == 0 &&
            (error = run_load_microcode(sc)) != 0) {
-               aprint_error_dev(sc->sc_dev,
+               device_printf(sc->sc_dev,
                    "could not load 8051 microcode\n");
                goto fail;
        }
@@ -4547,7 +4547,7 @@
                usbd_delay_ms(sc->sc_udev, 10);
        }
        if (ntries == 100) {
-               aprint_error_dev(sc->sc_dev,
+               device_printf(sc->sc_dev,
                    "timeout waiting for DMA engine\n");
                error = ETIMEDOUT;
                goto fail;
@@ -4565,7 +4565,7 @@
        run_write(sc, RT2860_USB_DMA_CFG, 0);
 
        if ((error = run_reset(sc)) != 0) {
-               aprint_error_dev(sc->sc_dev, "could not reset chipset\n");
+               device_printf(sc->sc_dev, "could not reset chipset\n");
                goto fail;
        }
 
@@ -4625,7 +4625,7 @@
        usbd_delay_ms(sc->sc_udev, 10);
 
        if ((error = run_bbp_init(sc)) != 0) {
-               aprint_error_dev(sc->sc_dev, "could not initialize BBP\n");
+               device_printf(sc->sc_dev, "could not initialize BBP\n");
                goto fail;
        }
 



Home | Main Index | Thread Index | Old Index