Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb revert the 0x% -> %# change for fixed width form...



details:   https://anonhg.NetBSD.org/src/rev/6b8dc3f34086
branches:  trunk
changeset: 745840:6b8dc3f34086
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Mar 14 02:35:33 2020 +0000

description:
revert the 0x% -> %# change for fixed width formats pointed out by uwe.

diffstat:

 sys/dev/usb/aubtfwl.c       |   10 ++--
 sys/dev/usb/auvitek.c       |    8 +-
 sys/dev/usb/ehci.c          |   70 +++++++++++++++---------------
 sys/dev/usb/emdtv.c         |   16 +++---
 sys/dev/usb/emdtv_dtv.c     |    6 +-
 sys/dev/usb/if_athn_usb.c   |    6 +-
 sys/dev/usb/if_aue.c        |    8 +-
 sys/dev/usb/if_axen.c       |   24 +++++-----
 sys/dev/usb/if_otus.c       |   22 ++++----
 sys/dev/usb/if_rum.c        |    8 +-
 sys/dev/usb/if_run.c        |   24 +++++-----
 sys/dev/usb/if_smsc.c       |   14 +++---
 sys/dev/usb/if_udav.c       |   16 +++---
 sys/dev/usb/if_umb.c        |   12 ++--
 sys/dev/usb/if_upgt.c       |   30 ++++++------
 sys/dev/usb/if_ural.c       |    8 +-
 sys/dev/usb/if_url.c        |   16 +++---
 sys/dev/usb/if_urtw.c       |    8 +-
 sys/dev/usb/if_urtwn.c      |   14 +++---
 sys/dev/usb/if_zyd.c        |    6 +-
 sys/dev/usb/irmce.c         |    6 +-
 sys/dev/usb/motg.c          |   14 +++---
 sys/dev/usb/ohci.c          |   76 ++++++++++++++++----------------
 sys/dev/usb/pseye.c         |   12 ++--
 sys/dev/usb/uatp.c          |   10 ++--
 sys/dev/usb/uaudio.c        |   28 ++++++------
 sys/dev/usb/ubsa_common.c   |    6 +-
 sys/dev/usb/uchcom.c        |   12 ++--
 sys/dev/usb/ucom.c          |    8 +-
 sys/dev/usb/ucycom.c        |    8 +-
 sys/dev/usb/udsbr.c         |    6 +-
 sys/dev/usb/udsir.c         |    6 +-
 sys/dev/usb/uftdi.c         |   26 +++++-----
 sys/dev/usb/ugen.c          |    6 +-
 sys/dev/usb/uhci.c          |   34 +++++++-------
 sys/dev/usb/uhidev.c        |    8 +-
 sys/dev/usb/uhso.c          |    8 +-
 sys/dev/usb/uirda.c         |   18 +++---
 sys/dev/usb/ukbd.c          |   12 ++--
 sys/dev/usb/ulpt.c          |    6 +-
 sys/dev/usb/umass.c         |   52 +++++++++++-----------
 sys/dev/usb/umass_isdata.c  |   20 ++++----
 sys/dev/usb/umass_scsipi.c  |    6 +-
 sys/dev/usb/umodem_common.c |    6 +-
 sys/dev/usb/uplcom.c        |    6 +-
 sys/dev/usb/usb_quirks.c    |    6 +-
 sys/dev/usb/usb_subr.c      |   24 +++++-----
 sys/dev/usb/usbdi.c         |   10 ++--
 sys/dev/usb/usscanner.c     |    8 +-
 sys/dev/usb/ustir.c         |    6 +-
 sys/dev/usb/uthum.c         |   10 ++--
 sys/dev/usb/utoppy.c        |   14 +++---
 sys/dev/usb/uts.c           |    8 +-
 sys/dev/usb/uvideo.c        |  100 ++++++++++++++++++++++----------------------
 sys/dev/usb/vhci.c          |    6 +-
 sys/dev/usb/xhci.c          |   68 ++++++++++++++--------------
 56 files changed, 493 insertions(+), 493 deletions(-)

diffs (truncated from 3955 to 300 lines):

diff -r 0f8222e0052a -r 6b8dc3f34086 sys/dev/usb/aubtfwl.c
--- a/sys/dev/usb/aubtfwl.c     Sat Mar 14 02:22:16 2020 +0000
+++ b/sys/dev/usb/aubtfwl.c     Sat Mar 14 02:35:33 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: aubtfwl.c,v 1.8 2020/03/13 18:17:40 christos Exp $ */
+/* $NetBSD: aubtfwl.c,v 1.9 2020/03/14 02:35:33 christos Exp $ */
 
 /*
  * Copyright (c) 2011 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aubtfwl.c,v 1.8 2020/03/13 18:17:40 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aubtfwl.c,v 1.9 2020/03/14 02:35:33 christos Exp $");
 
 #include <sys/param.h>
 #include <dev/usb/usb.h>
@@ -289,11 +289,11 @@
                        return;
                }
 
-               aprint_verbose_dev(self, "state is %#02x\n", state);
+               aprint_verbose_dev(self, "state is 0x%02x\n", state);
 
                if (!(state & AR3K_STATE_IS_PATCHED)) {
                        snprintf(firmware_name, sizeof(firmware_name),
-                               "ar3k/AthrBT_%#08x.dfu", ver.rom);
+                               "ar3k/AthrBT_0x%08x.dfu", ver.rom);
                        error = aubtfwl_firmware_load(self, firmware_name);
 
                        if (error)
@@ -313,7 +313,7 @@
                }
 
                snprintf(firmware_name, sizeof(firmware_name),
-                       "ar3k/ramps_%#08x_%d.dfu", ver.rom, clock);
+                       "ar3k/ramps_0x%08x_%d.dfu", ver.rom, clock);
                aubtfwl_firmware_load(self, firmware_name);
 
                if ((state & AR3K_STATE_MODE_MASK) != AR3K_STATE_MODE_NORMAL) {
diff -r 0f8222e0052a -r 6b8dc3f34086 sys/dev/usb/auvitek.c
--- a/sys/dev/usb/auvitek.c     Sat Mar 14 02:22:16 2020 +0000
+++ b/sys/dev/usb/auvitek.c     Sat Mar 14 02:35:33 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auvitek.c,v 1.11 2020/03/13 18:17:40 christos Exp $ */
+/* $NetBSD: auvitek.c,v 1.12 2020/03/14 02:35:33 christos Exp $ */
 
 /*-
  * Copyright (c) 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auvitek.c,v 1.11 2020/03/13 18:17:40 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auvitek.c,v 1.12 2020/03/14 02:35:33 christos Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -189,7 +189,7 @@
                return;
        }
 
-       aprint_debug_dev(self, "isoc endpoint %#02x size %d\n",
+       aprint_debug_dev(self, "isoc endpoint 0x%02x size %d\n",
            sc->sc_ax.ax_endpt, sc->sc_ax.ax_maxpktlen);
 
        nep = 0;
@@ -219,7 +219,7 @@
                return;
        }
 
-       aprint_debug_dev(self, "bulk endpoint %#02x size %d\n",
+       aprint_debug_dev(self, "bulk endpoint 0x%02x size %d\n",
            sc->sc_ab.ab_endpt, AUVITEK_BULK_BUFLEN);
 
        auvitek_board_init(sc);
diff -r 0f8222e0052a -r 6b8dc3f34086 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sat Mar 14 02:22:16 2020 +0000
+++ b/sys/dev/usb/ehci.c        Sat Mar 14 02:35:33 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.276 2020/03/13 18:17:40 christos Exp $ */
+/*     $NetBSD: ehci.c,v 1.277 2020/03/14 02:35:33 christos Exp $ */
 
 /*
  * Copyright (c) 2004-2012 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.276 2020/03/13 18:17:40 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.277 2020/03/14 02:35:33 christos Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -795,7 +795,7 @@
                if (EOREAD4(sc, EHCI_PORTSC(i)) & EHCI_PS_CLEAR)
                        p[i/8] |= 1 << (i%8);
                if (i % 8 == 7)
-                       DPRINTF("change(%jd)=%#02jx", i / 8, p[i/8], 0, 0);
+                       DPRINTF("change(%jd)=0x%02jx", i / 8, p[i/8], 0, 0);
        }
        xfer->ux_actlen = xfer->ux_length;
        xfer->ux_status = USBD_NORMAL_COMPLETION;
@@ -1216,7 +1216,7 @@
         */
        if ((sqtd != lsqtd->nextqtd || EHCI_QTD_GET_BYTES(status)) &&
            xfer->ux_pipe->up_dev->ud_pipe0 != xfer->ux_pipe) {
-               DPRINTF("toggle update status=%#08jx nstatus=%#08jx",
+               DPRINTF("toggle update status=0x%08jx nstatus=0x%08jx",
                    status, nstatus, 0, 0);
 #if 0
                ehci_dump_sqh(epipe->sqh);
@@ -1225,12 +1225,12 @@
                epipe->nexttoggle = EHCI_QTD_GET_TOGGLE(nstatus);
        }
 
-       DPRINTF("len=%jd actlen=%jd status=%#08jx", xfer->ux_length, actlen,
+       DPRINTF("len=%jd actlen=%jd status=0x%08jx", xfer->ux_length, actlen,
            status, 0);
        xfer->ux_actlen = actlen;
        if (status & EHCI_QTD_HALTED) {
 #ifdef EHCI_DEBUG
-               DPRINTF("halted addr=%jd endpt=%#02jx",
+               DPRINTF("halted addr=%jd endpt=0x%02jx",
                    xfer->ux_pipe->up_dev->ud_addr,
                    xfer->ux_pipe->up_endpoint->ue_edesc->bEndpointAddress,
                    0, 0);
@@ -1295,7 +1295,7 @@
        int new;
        new = EHCI_STS_INTRS(EOREAD4(sc, EHCI_USBSTS));
        if (new != last) {
-               DPRINTF("intrs=%#04jx", new, 0, 0, 0);
+               DPRINTF("intrs=0x%04jx", new, 0, 0, 0);
                last = new;
        }
 #endif
@@ -1577,7 +1577,7 @@
 
        EHCIHIST_FUNC(); EHCIHIST_CALLED();
 
-       DPRINTF("epipe=%#jx status=%#08jx", (uintptr_t)epipe,
+       DPRINTF("epipe=%#jx status=0x%08jx", (uintptr_t)epipe,
            epipe->sqh->qh.qh_qtd.qtd_status, 0, 0);
 #ifdef EHCI_DEBUG
        if (ehcidebug)
@@ -1601,17 +1601,17 @@
 {
        ehci_softc_t *sc = theehci;
        int i;
-       printf("cmd=%#08x, sts=%#08x, ien=%#08x\n",
+       printf("cmd=0x%08x, sts=0x%08x, ien=0x%08x\n",
            EOREAD4(sc, EHCI_USBCMD),
            EOREAD4(sc, EHCI_USBSTS),
            EOREAD4(sc, EHCI_USBINTR));
-       printf("frindex=%#08x ctrdsegm=%#08x periodic=%#08x async=%#08x\n",
+       printf("frindex=0x%08x ctrdsegm=0x%08x periodic=0x%08x async=0x%08x\n",
            EOREAD4(sc, EHCI_FRINDEX),
            EOREAD4(sc, EHCI_CTRLDSSEGMENT),
            EOREAD4(sc, EHCI_PERIODICLISTBASE),
            EOREAD4(sc, EHCI_ASYNCLISTADDR));
        for (i = 1; i <= sc->sc_noport; i++)
-               printf("port %d status=%#08x\n", i,
+               printf("port %d status=0x%08x\n", i,
                    EOREAD4(sc, EHCI_PORTSC(i)));
 }
 
@@ -1622,21 +1622,21 @@
 
        EHCIHIST_FUNC(); EHCIHIST_CALLED();
 
-       DPRINTF("cmd     = %#08jx  sts      = %#08jx  ien      = %#08jx",
+       DPRINTF("cmd     = 0x%08jx  sts      = 0x%08jx  ien      = 0x%08jx",
            EOREAD4(sc, EHCI_USBCMD), EOREAD4(sc, EHCI_USBSTS),
            EOREAD4(sc, EHCI_USBINTR), 0);
-       DPRINTF("frindex = %#08jx  ctrdsegm = %#08jx  periodic = %#08jx  "
-           "async   = %#08jx",
+       DPRINTF("frindex = 0x%08jx  ctrdsegm = 0x%08jx  periodic = 0x%08jx  "
+           "async   = 0x%08jx",
            EOREAD4(sc, EHCI_FRINDEX), EOREAD4(sc, EHCI_CTRLDSSEGMENT),
            EOREAD4(sc, EHCI_PERIODICLISTBASE),
            EOREAD4(sc, EHCI_ASYNCLISTADDR));
        for (i = 1; i <= sc->sc_noport; i += 2) {
                if (i == sc->sc_noport) {
-                       DPRINTF("port %jd status = %#08jx", i,
+                       DPRINTF("port %jd status = 0x%08jx", i,
                            EOREAD4(sc, EHCI_PORTSC(i)), 0, 0);
                } else {
-                       DPRINTF("port %jd status = %#08jx  port %jd "
-                           "status = %#08jx",
+                       DPRINTF("port %jd status = 0x%08jx  port %jd "
+                           "status = 0x%08jx",
                            i, EOREAD4(sc, EHCI_PORTSC(i)),
                            i+1, EOREAD4(sc, EHCI_PORTSC(i+1)));
                }
@@ -1644,7 +1644,7 @@
 }
 
 #define ehci_dump_link(link, type) do {                                        \
-       DPRINTF("    link %#08jx (T = %jd):",                           \
+       DPRINTF("    link 0x%08jx (T = %jd):",                          \
            link,                                                       \
            link & EHCI_LINK_TERMINATE ? 1 : 0, 0, 0);                  \
        if (type) {                                                     \
@@ -1687,7 +1687,7 @@
        usb_syncmem(&sqtd->dma, sqtd->offs,
            sizeof(sqtd->qtd), BUS_DMASYNC_POSTWRITE | BUS_DMASYNC_POSTREAD);
 
-       DPRINTFN(10, "QTD(%#jx) at %#08jx:", (uintptr_t)sqtd, sqtd->physaddr,
+       DPRINTFN(10, "QTD(%#jx) at 0x%08jx:", (uintptr_t)sqtd, sqtd->physaddr,
            0, 0);
        ehci_dump_qtd(&sqtd->qtd);
 
@@ -1702,7 +1702,7 @@
        uint32_t s = le32toh(qtd->qtd_status);
 
        DPRINTFN(10,
-           "     next = %#08jx  altnext = %#08jx  status = %#08jx",
+           "     next = 0x%08jx  altnext = 0x%08jx  status = 0x%08jx",
            qtd->qtd_next, qtd->qtd_altnext, s, 0);
        DPRINTFN(10,
            "   toggle = %jd ioc = %jd bytes = %#jx c_page = %#jx",
@@ -1750,7 +1750,7 @@
 
        endp = le32toh(qh->qh_endp);
        DPRINTFN(10, "    endp = %#jx", endp, 0, 0, 0);
-       DPRINTFN(10, "        addr = %#02jx  inact = %jd  endpt = %jd  "
+       DPRINTFN(10, "        addr = 0x%02jx  inact = %jd  endpt = %jd  "
            "eps = %jd",
            EHCI_QH_GET_ADDR(endp), EHCI_QH_GET_INACT(endp),
            EHCI_QH_GET_ENDPT(endp), EHCI_QH_GET_EPS(endp));
@@ -1762,9 +1762,9 @@
 
        endphub = le32toh(qh->qh_endphub);
        DPRINTFN(10, " endphub = %#jx", endphub, 0, 0, 0);
-       DPRINTFN(10, "      smask = %#02jx  cmask = %#02jx one %jx",
+       DPRINTFN(10, "      smask = 0x%02jx  cmask = 0x%02jx one %jx",
            EHCI_QH_GET_SMASK(endphub), EHCI_QH_GET_CMASK(endphub), 1, 0);
-       DPRINTFN(10, "      huba  = %#02jx  port  = %jd  mult = %jd",
+       DPRINTFN(10, "      huba  = 0x%02jx  port  = %jd  mult = %jd",
            EHCI_QH_GET_HUBA(endphub), EHCI_QH_GET_PORT(endphub),
            EHCI_QH_GET_MULT(endphub), 0);
 
@@ -1932,7 +1932,7 @@
                        pipe->up_methods = &ehci_root_intr_methods;
                        break;
                default:
-                       DPRINTF("bad bEndpointAddress %#02jx",
+                       DPRINTF("bad bEndpointAddress 0x%02jx",
                            ed->bEndpointAddress, 0, 0, 0);
                        return USBD_INVAL;
                }
@@ -2192,12 +2192,12 @@
 
        /* ask for doorbell */
        EOWRITE4(sc, EHCI_USBCMD, EOREAD4(sc, EHCI_USBCMD) | EHCI_CMD_IAAD);
-       DPRINTF("cmd = %#08jx sts = %#08jx",
+       DPRINTF("cmd = 0x%08jx sts = 0x%08jx",
            EOREAD4(sc, EHCI_USBCMD), EOREAD4(sc, EHCI_USBSTS), 0, 0);
 
        error = cv_timedwait(&sc->sc_doorbell, &sc->sc_lock, hz); /* bell wait */
 
-       DPRINTF("cmd = %#08jx sts = %#08jx ... done",
+       DPRINTF("cmd = 0x%08jx sts = 0x%08jx ... done",
            EOREAD4(sc, EHCI_USBCMD), EOREAD4(sc, EHCI_USBSTS), 0, 0);
 #ifdef DIAGNOSTIC
        if (error == EWOULDBLOCK) {
@@ -2322,7 +2322,7 @@
        if (sc->sc_dying)
                return -1;
 
-       DPRINTF("type=%#02jx request=%02jx", req->bmRequestType, req->bRequest,
+       DPRINTF("type=0x%02jx request=%02jx", req->bmRequestType, req->bRequest,
            0, 0);
 
        len = UGETW(req->wLength);
@@ -2358,7 +2358,7 @@
                }
                port = EHCI_PORTSC(index);
                v = EOREAD4(sc, port);
-               DPRINTF("portsc=%#08jx", v, 0, 0, 0);
+               DPRINTF("portsc=0x%08jx", v, 0, 0, 0);
                v &= ~EHCI_PS_CLEAR;
                switch (value) {
                case UHF_PORT_ENABLE:
@@ -2457,7 +2457,7 @@
                        return -1;
                }
                v = EOREAD4(sc, EHCI_PORTSC(index));
-               DPRINTF("port status=%#04jx", v, 0, 0, 0);
+               DPRINTF("port status=0x%04jx", v, 0, 0, 0);
 
                i = UPS_HIGH_SPEED;
                if (sc->sc_flags & EHCIF_ETTF) {
@@ -2497,7 +2497,7 @@
                }
                port = EHCI_PORTSC(index);
                v = EOREAD4(sc, port);
-               DPRINTF("portsc=%#08jx", v, 0, 0, 0);
+               DPRINTF("portsc=0x%08jx", v, 0, 0, 0);



Home | Main Index | Thread Index | Old Index