Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci PR/23802: KIYOHARA Takashi: Bad printf format wi...



details:   https://anonhg.NetBSD.org/src/rev/79c3ed4a2540
branches:  trunk
changeset: 556509:79c3ed4a2540
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Dec 19 18:16:43 2003 +0000

description:
PR/23802: KIYOHARA Takashi: Bad printf format with CBB_DEBUG. While I am
there, make all printfs consistent 0x%lx and (unsigned long) cast.

diffstat:

 sys/dev/pci/pccbb.c |  20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diffs (62 lines):

diff -r 71d4eeac4011 -r 79c3ed4a2540 sys/dev/pci/pccbb.c
--- a/sys/dev/pci/pccbb.c       Fri Dec 19 15:23:43 2003 +0000
+++ b/sys/dev/pci/pccbb.c       Fri Dec 19 18:16:43 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pccbb.c,v 1.93 2003/12/10 02:55:48 briggs Exp $        */
+/*     $NetBSD: pccbb.c,v 1.94 2003/12/19 18:16:43 christos Exp $      */
 
 /*
  * Copyright (c) 1998, 1999 and 2000
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.93 2003/12/10 02:55:48 briggs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pccbb.c,v 1.94 2003/12/19 18:16:43 christos Exp $");
 
 /*
 #define CBB_DEBUG
@@ -484,8 +484,8 @@
                /* The address must be valid. */
                if (pci_mapreg_map(pa, PCI_SOCKBASE, PCI_MAPREG_TYPE_MEM, 0,
                    &sc->sc_base_memt, &sc->sc_base_memh, &sockbase, NULL)) {
-                       printf("%s: can't map socket base address 0x%x\n",
-                           sc->sc_dev.dv_xname, sock_base);
+                       printf("%s: can't map socket base address 0x%lx\n",
+                           sc->sc_dev.dv_xname, (unsigned long)sock_base);
                        /*
                         * I think it's funny: socket base registers must be
                         * mapped on memory space, but ...
@@ -502,7 +502,7 @@
                                sc->sc_flags |= CBB_MEMHMAPPED;
                } else {
                        DPRINTF(("%s: socket base address 0x%lx\n",
-                           sc->sc_dev.dv_xname, sockbase));
+                           sc->sc_dev.dv_xname, (unsigned long)sockbase));
                        sc->sc_flags |= CBB_MEMHMAPPED;
                }
        }
@@ -624,8 +624,9 @@
                }
                sc->sc_base_memt = sc->sc_memt;
                pci_conf_write(pc, sc->sc_tag, PCI_SOCKBASE, sockbase);
-               DPRINTF(("%s: CardBus resister address 0x%lx -> 0x%x\n",
-                   sc->sc_dev.dv_xname, sockbase, pci_conf_read(pc, sc->sc_tag,
+               DPRINTF(("%s: CardBus resister address 0x%lx -> 0x%lx\n",
+                   sc->sc_dev.dv_xname, (unsigned long)sockbase,
+                   (unsigned long)pci_conf_read(pc, sc->sc_tag,
                    PCI_SOCKBASE)));
 #else
                sc->sc_base_memt = sc->sc_memt;
@@ -638,8 +639,9 @@
                        return;
                }
                pci_conf_write(pc, sc->sc_tag, PCI_SOCKBASE, sockbase);
-               DPRINTF(("%s: CardBus resister address 0x%x -> 0x%x\n",
-                   sc->sc_dev.dv_xname, sock_base, pci_conf_read(pc,
+               DPRINTF(("%s: CardBus resister address 0x%lx -> 0x%lx\n",
+                   sc->sc_dev.dv_xname, (unsigned long)sock_base,
+                   (unsigned long)pci_conf_read(pc,
                    sc->sc_tag, PCI_SOCKBASE)));
                sc->sc_sockbase = sockbase;
 #endif



Home | Main Index | Thread Index | Old Index