summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2013-11-01 17:36:20 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2013-11-01 17:36:20 +0000
commitb8183a0dbd4877f3cb0a20e0e6125c02674f08d2 (patch)
treed8807435b56011aa01dbd9ae817d091c18d254de /sys/arch/sparc
parent0b88d158f37a4188b2c37633639614eba0110aa5 (diff)
Sprinkle (long long) casts where %lld is being used to print daddr_t
variables. Some random whitespace/knf repairs encountered on the way. ok miod@ on inspection, feedback & more suggestions from millert@
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/dev/fd.c15
-rw-r--r--sys/arch/sparc/dev/xd.c4
-rw-r--r--sys/arch/sparc/dev/xy.c4
3 files changed, 13 insertions, 10 deletions
diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c
index 7d9cadf029b..ca2784aedd1 100644
--- a/sys/arch/sparc/dev/fd.c
+++ b/sys/arch/sparc/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.84 2013/06/11 16:42:11 deraadt Exp $ */
+/* $OpenBSD: fd.c,v 1.85 2013/11/01 17:36:19 krw Exp $ */
/* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */
/*-
@@ -727,8 +727,9 @@ fdstrategy(bp)
#ifdef FD_DEBUG
if (fdc_debug > 1)
- printf("fdstrategy: b_blkno %d b_bcount %ld blkno %lld cylin %ld\n",
- bp->b_blkno, bp->b_bcount, fd->sc_blkno, bp->b_cylinder);
+ printf("fdstrategy: b_blkno %lld b_bcount %ld blkno %lld "
+ "cylin %ld\n", (long long)bp->b_blkno, bp->b_bcount,
+ (long long)fd->sc_blkno, bp->b_cylinder);
#endif
/* Queue transfer on drive, activate drive and controller if idle. */
@@ -1380,9 +1381,11 @@ loop:
sec -= head * type->sectrac;
#ifdef DIAGNOSTIC
{int block;
- block = (fd->sc_cylin * type->heads + head) * type->sectrac + sec;
+ block = (fd->sc_cylin * type->heads + head) * type->sectrac +
+ sec;
if (block != fd->sc_blkno) {
- printf("fdcintr: block %d != blkno %lld\n", block, fd->sc_blkno);
+ printf("fdcintr: block %d != blkno %lld\n", block,
+ (long long)fd->sc_blkno);
#if defined(FD_DEBUG) && defined(DDB)
Debugger();
#endif
@@ -1510,7 +1513,7 @@ loop:
bp->b_flags & B_READ
? "read failed" : "write failed");
printf("blkno %lld nblks %d nstat %d tc %d\n",
- fd->sc_blkno, fd->sc_nblks,
+ (long long)fd->sc_blkno, fd->sc_nblks,
fdc->sc_nstat, fdc->sc_tc);
}
#endif
diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c
index f16c7bce5e5..6704b446425 100644
--- a/sys/arch/sparc/dev/xd.c
+++ b/sys/arch/sparc/dev/xd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xd.c,v 1.60 2013/10/20 10:11:16 krw Exp $ */
+/* $OpenBSD: xd.c,v 1.61 2013/11/01 17:36:19 krw Exp $ */
/* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */
/*
@@ -1381,7 +1381,7 @@ xdc_startbuf(xdcsc, xdsc, bp)
#ifdef XDC_DEBUG
printf("xdc_startbuf: %s%c: %s block %lld\n",
xdsc->sc_dev.dv_xname, 'a' + partno,
- (bp->b_flags & B_READ) ? "read" : "write", bp->b_blkno);
+ (bp->b_flags & B_READ) ? "read" : "write", (long long)bp->b_blkno);
printf("xdc_startbuf: b_bcount %d, b_data 0x%x\n",
bp->b_bcount, bp->b_data);
#endif
diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c
index ba0be46bd01..ea4838dee00 100644
--- a/sys/arch/sparc/dev/xy.c
+++ b/sys/arch/sparc/dev/xy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xy.c,v 1.56 2013/10/20 10:11:16 krw Exp $ */
+/* $OpenBSD: xy.c,v 1.57 2013/11/01 17:36:19 krw Exp $ */
/* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */
/*
@@ -1238,7 +1238,7 @@ xyc_startbuf(xycsc, xysc, bp)
#ifdef XYC_DEBUG
printf("xyc_startbuf: %s%c: %s block %lld\n",
xysc->sc_dev.dv_xname, 'a' + partno,
- (bp->b_flags & B_READ) ? "read" : "write", bp->b_blkno);
+ (bp->b_flags & B_READ) ? "read" : "write", (long long)bp->b_blkno);
printf("xyc_startbuf: b_bcount %d, b_data 0x%x\n",
bp->b_bcount, bp->b_data);
#endif