Source-Changes-HG archive

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

[src/trunk]: src/sys 0x%#x --> %#x for non-external codes.



details:   https://anonhg.NetBSD.org/src/rev/bf3016e30dd1
branches:  trunk
changeset: 745186:bf3016e30dd1
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Feb 24 12:38:57 2020 +0000

description:
0x%#x --> %#x for non-external codes.
Also, stop mixing up 0x%x and %#x in single files as far as possible.

diffstat:

 sys/arch/arm/arm32/fault.c  |   6 +++---
 sys/arch/arm/at91/at91pmc.c |  10 +++++-----
 sys/dev/fdt/fdt_subr.c      |   6 +++---
 sys/dev/tprof/tprof_armv7.c |   6 +++---
 sys/dev/usb/if_axe.c        |  16 ++++++++--------
 sys/uvm/uvm_amap.c          |  39 +++++++++++++++++++--------------------
 sys/uvm/uvm_anon.c          |  10 +++++-----
 sys/uvm/uvm_aobj.c          |  12 ++++++------
 sys/uvm/uvm_device.c        |  16 ++++++++--------
 sys/uvm/uvm_fault.c         |  14 +++++++-------
 sys/uvm/uvm_km.c            |  14 +++++++-------
 sys/uvm/uvm_pager.c         |  10 +++++-----
 12 files changed, 79 insertions(+), 80 deletions(-)

diffs (truncated from 699 to 300 lines):

diff -r a46c1e7f5469 -r bf3016e30dd1 sys/arch/arm/arm32/fault.c
--- a/sys/arch/arm/arm32/fault.c        Mon Feb 24 12:20:29 2020 +0000
+++ b/sys/arch/arm/arm32/fault.c        Mon Feb 24 12:38:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fault.c,v 1.109 2019/11/29 17:33:43 ryo Exp $  */
+/*     $NetBSD: fault.c,v 1.110 2020/02/24 12:38:57 rin Exp $  */
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
 #include "opt_kgdb.h"
 
 #include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.109 2019/11/29 17:33:43 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.110 2020/02/24 12:38:57 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -835,7 +835,7 @@
        /* Get fault address */
        fault_pc = tf->tf_pc;
        KASSERTMSG(tf == lwp_trapframe(l), "tf %p vs %p", tf, lwp_trapframe(l));
-       UVMHIST_LOG(maphist, " (pc=0x%jx, l=0x%#jx, tf=0x%#jx)",
+       UVMHIST_LOG(maphist, " (pc=%#jx, l=%#jx, tf=%#jx)",
            fault_pc, (uintptr_t)l, (uintptr_t)tf, 0);
 
 #ifdef THUMB_CODE
diff -r a46c1e7f5469 -r bf3016e30dd1 sys/arch/arm/at91/at91pmc.c
--- a/sys/arch/arm/at91/at91pmc.c       Mon Feb 24 12:20:29 2020 +0000
+++ b/sys/arch/arm/at91/at91pmc.c       Mon Feb 24 12:38:57 2020 +0000
@@ -1,5 +1,5 @@
-/*     $Id: at91pmc.c,v 1.7 2019/04/11 14:38:05 kamil Exp $    */
-/*     $NetBSD: at91pmc.c,v 1.7 2019/04/11 14:38:05 kamil Exp $        */
+/*     $Id: at91pmc.c,v 1.8 2020/02/24 12:38:57 rin Exp $      */
+/*     $NetBSD: at91pmc.c,v 1.8 2020/02/24 12:38:57 rin Exp $  */
 
 /*
  * Copyright (c) 2007 Embedtronics Oy
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at91pmc.c,v 1.7 2019/04/11 14:38:05 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at91pmc.c,v 1.8 2020/02/24 12:38:57 rin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -56,10 +56,10 @@
        uint32_t                reg;
 
        if (!((reg = PMCREG(PMC_MOR)) & PMC_MOR_MOSCEN))
-               panic("%s: main oscillator not enabled (MOR=0x%#X)", __FUNCTION__, reg);
+               panic("%s: main oscillator not enabled (MOR=%#X)", __FUNCTION__, reg);
 
        if (!((reg = PMCREG(PMC_MCFR)) & PMC_MCFR_MAINRDY))
-               panic("%s: main oscillator not ready (MCFR=0x%#X)", __FUNCTION__, reg);
+               panic("%s: main oscillator not ready (MCFR=%#X)", __FUNCTION__, reg);
 
        mclk  = ((reg & PMC_MCFR_MAINF) * SLOW_CLOCK) / 16U;
 
diff -r a46c1e7f5469 -r bf3016e30dd1 sys/dev/fdt/fdt_subr.c
--- a/sys/dev/fdt/fdt_subr.c    Mon Feb 24 12:20:29 2020 +0000
+++ b/sys/dev/fdt/fdt_subr.c    Mon Feb 24 12:38:57 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_subr.c,v 1.34 2020/02/20 01:35:55 jmcneill Exp $ */
+/* $NetBSD: fdt_subr.c,v 1.35 2020/02/24 12:38:57 rin Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_subr.c,v 1.34 2020/02/20 01:35:55 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_subr.c,v 1.35 2020/02/24 12:38:57 rin Exp $");
 
 #include "opt_fdt.h"
 
@@ -243,7 +243,7 @@
                buf += size_cells * 4;
 
 #ifdef FDTBUS_DEBUG
-               printf("%s: %s: cba=0x%#" PRIx64 ", pba=0x%#" PRIx64 ", cl=0x%#" PRIx64 "\n", __func__, fdt_get_name(fdtbus_get_data(), fdtbus_phandle2offset(phandle), NULL), cba, pba, cl);
+               printf("%s: %s: cba=%#" PRIx64 ", pba=%#" PRIx64 ", cl=%#" PRIx64 "\n", __func__, fdt_get_name(fdtbus_get_data(), fdtbus_phandle2offset(phandle), NULL), cba, pba, cl);
 #endif
 
                if (paddr >= cba && paddr < cba + cl)
diff -r a46c1e7f5469 -r bf3016e30dd1 sys/dev/tprof/tprof_armv7.c
--- a/sys/dev/tprof/tprof_armv7.c       Mon Feb 24 12:20:29 2020 +0000
+++ b/sys/dev/tprof/tprof_armv7.c       Mon Feb 24 12:38:57 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tprof_armv7.c,v 1.2 2018/07/16 10:56:42 jmcneill Exp $ */
+/* $NetBSD: tprof_armv7.c,v 1.3 2020/02/24 12:38:57 rin Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tprof_armv7.c,v 1.2 2018/07/16 10:56:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof_armv7.c,v 1.3 2020/02/24 12:38:57 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -173,7 +173,7 @@
        uint64_t xc;
 
        if (!armv7_pmu_event_implemented(param->p_event)) {
-               printf("%s: event 0x%#llx not implemented on this CPU\n",
+               printf("%s: event %#llx not implemented on this CPU\n",
                    __func__, param->p_event);
                return EINVAL;
        }
diff -r a46c1e7f5469 -r bf3016e30dd1 sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c      Mon Feb 24 12:20:29 2020 +0000
+++ b/sys/dev/usb/if_axe.c      Mon Feb 24 12:38:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_axe.c,v 1.122 2020/01/29 06:24:10 thorpej Exp $     */
+/*     $NetBSD: if_axe.c,v 1.123 2020/02/24 12:38:57 rin 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.122 2020/01/29 06:24:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.123 2020/02/24 12:38:57 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -321,7 +321,7 @@
        usbd_status err;
        uint16_t data;
 
-       DPRINTFN(30, "phy 0x%jx reg 0x%jx\n", phy, reg, 0, 0);
+       DPRINTFN(30, "phy %#jx reg %#jx\n", phy, reg, 0, 0);
 
        if (un->un_phyno != phy)
                return EINVAL;
@@ -347,7 +347,7 @@
                *val &= ~BMSR_EXTCAP;
        }
 
-       DPRINTFN(30, "phy 0x%jx reg 0x%jx val %#jx", phy, reg, *val, 0);
+       DPRINTFN(30, "phy %#jx reg %#jx val %#jx", phy, reg, *val, 0);
 
        return 0;
 }
@@ -417,7 +417,7 @@
                }
        }
 
-       DPRINTF("val=0x%jx", val, 0, 0, 0);
+       DPRINTF("val=%#jx", val, 0, 0, 0);
        usbnet_lock_mii(un);
        err = axe_cmd(sc, AXE_CMD_WRITE_MEDIA, 0, val, NULL);
        usbnet_unlock_mii(un);
@@ -597,7 +597,7 @@
 
        eeprom = le16toh(eeprom);
 
-       DPRINTF("EEPROM is 0x%jx", eeprom, 0, 0, 0);
+       DPRINTF("EEPROM is %#jx", eeprom, 0, 0, 0);
 
        /* if EEPROM is invalid we have to use to GPIO0 */
        if (eeprom == 0xffff) {
@@ -1040,7 +1040,7 @@
 
                        memcpy(&hdr, buf, sizeof(hdr));
 
-                       DPRINTFN(20, "total_len %#jx len %jx ilen %#jx",
+                       DPRINTFN(20, "total_len %#jx len %#jx ilen %#jx",
                            total_len,
                            (le16toh(hdr.len) & AXE_RH1M_RXLEN_MASK),
                            (le16toh(hdr.ilen) & AXE_RH1M_RXLEN_MASK), 0);
@@ -1331,7 +1331,7 @@
        if (ifp->if_flags & IFF_BROADCAST)
                rxmode |= AXE_RXCMD_BROADCAST;
 
-       DPRINTF("rxmode 0x%#jx", rxmode, 0, 0, 0);
+       DPRINTF("rxmode %#jx", rxmode, 0, 0, 0);
 
        axe_cmd(sc, AXE_CMD_RXCTL_WRITE, 0, rxmode, NULL);
 
diff -r a46c1e7f5469 -r bf3016e30dd1 sys/uvm/uvm_amap.c
--- a/sys/uvm/uvm_amap.c        Mon Feb 24 12:20:29 2020 +0000
+++ b/sys/uvm/uvm_amap.c        Mon Feb 24 12:38:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_amap.c,v 1.115 2020/02/23 15:46:43 ad Exp $        */
+/*     $NetBSD: uvm_amap.c,v 1.116 2020/02/24 12:38:57 rin Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.115 2020/02/23 15:46:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_amap.c,v 1.116 2020/02/24 12:38:57 rin Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -246,7 +246,7 @@
                    amap->am_maxslot * sizeof(struct vm_anon *));
        }
 
-       UVMHIST_LOG(maphist,"<- done, amap = 0x%#jx, sz=%jd", (uintptr_t)amap,
+       UVMHIST_LOG(maphist,"<- done, amap = %#jx, sz=%jd", (uintptr_t)amap,
            sz, 0, 0);
        return(amap);
 }
@@ -333,7 +333,7 @@
                kmem_free(amap->am_ppref, slots * sizeof(*amap->am_ppref));
 #endif
        pool_cache_put(&uvm_amap_cache, amap);
-       UVMHIST_LOG(maphist,"<- done, freed amap = 0x%#jx", (uintptr_t)amap,
+       UVMHIST_LOG(maphist,"<- done, freed amap = %#jx", (uintptr_t)amap,
            0, 0, 0);
 }
 
@@ -364,7 +364,7 @@
 
        UVMHIST_FUNC("amap_extend"); UVMHIST_CALLED(maphist);
 
-       UVMHIST_LOG(maphist, "  (entry=0x%#jx, addsize=0x%jx, flags=0x%jx)",
+       UVMHIST_LOG(maphist, "  (entry=%#jx, addsize=%#jx, flags=%#jx)",
            (uintptr_t)entry, addsize, flags, 0);
 
        /*
@@ -404,7 +404,7 @@
 #endif
                        uvm_anon_freelst(amap, tofree);
                        UVMHIST_LOG(maphist,
-                           "<- done (case 1f), amap = 0x%#jx, sltneed=%jd",
+                           "<- done (case 1f), amap = %#jx, sltneed=%jd",
                            (uintptr_t)amap, slotneed, 0, 0);
                        return 0;
                }
@@ -420,7 +420,7 @@
 #endif
                        uvm_anon_freelst(amap, tofree);
                        UVMHIST_LOG(maphist,
-                           "<- done (case 1b), amap = 0x%#jx, sltneed=%jd",
+                           "<- done (case 1b), amap = %#jx, sltneed=%jd",
                            (uintptr_t)amap, slotneed, 0, 0);
                        return 0;
                }
@@ -453,7 +453,7 @@
                         * alloc time and we never shrink an allocation.
                         */
 
-                       UVMHIST_LOG(maphist,"<- done (case 2f), amap = 0x%#jx, "
+                       UVMHIST_LOG(maphist,"<- done (case 2f), amap = %#jx, "
                            "slotneed=%jd", (uintptr_t)amap, slotneed, 0, 0);
                        return 0;
                } else {
@@ -510,7 +510,7 @@
                        entry->aref.ar_pageoff = slotarea - slotadd;
                        amap_unlock(amap);
 
-                       UVMHIST_LOG(maphist,"<- done (case 2b), amap = 0x%#jx, "
+                       UVMHIST_LOG(maphist,"<- done (case 2b), amap = %#jx, "
                            "slotneed=%jd", (uintptr_t)amap, slotneed, 0, 0);
                        return 0;
                }
@@ -656,7 +656,7 @@
        if (oldppref && oldppref != PPREF_NONE)
                kmem_free(oldppref, oldnslots * sizeof(*oldppref));
 #endif
-       UVMHIST_LOG(maphist,"<- done (case 3), amap = 0x%#jx, slotneed=%jd",
+       UVMHIST_LOG(maphist,"<- done (case 3), amap = %#jx, slotneed=%jd",
            (uintptr_t)amap, slotneed, 0, 0);
        return 0;
 }
@@ -731,7 +731,7 @@
        u_int lcv;
 
        UVMHIST_FUNC("amap_wipeout"); UVMHIST_CALLED(maphist);
-       UVMHIST_LOG(maphist,"(amap=0x%#jx)", (uintptr_t)amap, 0,0,0);
+       UVMHIST_LOG(maphist,"(amap=%#jx)", (uintptr_t)amap, 0,0,0);
 
        KASSERT(rw_write_held(amap->am_lock));
        KASSERT(amap->am_ref == 0);
@@ -753,7 +753,7 @@
                KASSERT(anon != NULL && anon->an_ref != 0);
 
                KASSERT(anon->an_lock == amap->am_lock);
-               UVMHIST_LOG(maphist,"  processing anon 0x%#jx, ref=%jd",
+               UVMHIST_LOG(maphist,"  processing anon %#jx, ref=%jd",
                    (uintptr_t)anon, anon->an_ref, 0, 0);
 
                /*
@@ -834,8 +834,7 @@
                        startva = (startva / chunksize) * chunksize;
                        endva = roundup(endva, chunksize);
                        UVMHIST_LOG(maphist,
-                           "  chunk amap ==> clip 0x%jx->0x%jx to "
-                           "0x%jx->0x%jx",



Home | Main Index | Thread Index | Old Index