Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic bus_addt_t is different widths on different archs...



details:   https://anonhg.NetBSD.org/src/rev/9f6234cf0bf8
branches:  trunk
changeset: 454554:9f6234cf0bf8
user:      kre <kre%NetBSD.org@localhost>
date:      Sat Sep 21 12:57:25 2019 +0000

description:
bus_addt_t is different widths on different archs, so there is no
one simple %?x format that will always work to print it.  Cast to
intmax_t and use %jx which should work everywhere.

diffstat:

 sys/dev/ic/mpt.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 7ed414434308 -r 9f6234cf0bf8 sys/dev/ic/mpt.c
--- a/sys/dev/ic/mpt.c  Sat Sep 21 11:46:25 2019 +0000
+++ b/sys/dev/ic/mpt.c  Sat Sep 21 12:57:25 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mpt.c,v 1.19 2019/09/21 07:08:27 maxv Exp $    */
+/*     $NetBSD: mpt.c,v 1.20 2019/09/21 12:57:25 kre Exp $     */
 
 /*
  * Copyright (c) 2000, 2001 by Greg Ansley
@@ -110,7 +110,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpt.c,v 1.19 2019/09/21 07:08:27 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpt.c,v 1.20 2019/09/21 12:57:25 kre Exp $");
 
 #include <dev/ic/mpt.h>
 
@@ -327,8 +327,8 @@
        if (mpt->verbose > 1) {
                u_int32_t *pReq;
                pReq = req->req_vbuf;
-               mpt_prt(mpt, "Send Request %d (%#lx):",
-                   req->index, req->req_pbuf);
+               mpt_prt(mpt, "Send Request %d (%#jx):",
+                   req->index, (intmax_t)req->req_pbuf);
                mpt_prt(mpt, "%08x %08x %08x %08x",
                    pReq[0], pReq[1], pReq[2], pReq[3]);
                mpt_prt(mpt, "%08x %08x %08x %08x",



Home | Main Index | Thread Index | Old Index