diff options
author | bde <bde@FreeBSD.org> | 1998-07-11 07:46:16 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-07-11 07:46:16 +0000 |
commit | f0b863f4b5c8604ff238621b7fcd6becea496675 (patch) | |
tree | 204ad88277d5159445cec0b7fbc88090454d53eb /sys/pci | |
parent | 065e3edb4989d6adb56bfc42cab8726f680cef5b (diff) | |
download | FreeBSD-src-f0b863f4b5c8604ff238621b7fcd6becea496675.zip FreeBSD-src-f0b863f4b5c8604ff238621b7fcd6becea496675.tar.gz |
Fixed printf format errors.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/ide_pci.c | 29 | ||||
-rw-r--r-- | sys/pci/ncr.c | 17 |
2 files changed, 25 insertions, 21 deletions
diff --git a/sys/pci/ide_pci.c b/sys/pci/ide_pci.c index 8f5ec43..d358d9a 100644 --- a/sys/pci/ide_pci.c +++ b/sys/pci/ide_pci.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ide_pci.c,v 1.11 1998/06/17 12:14:55 bde Exp $ + * $Id: ide_pci.c,v 1.12 1998/06/17 14:58:03 bde Exp $ */ #include "pci.h" @@ -330,18 +330,18 @@ via_571_status(struct ide_pci_cookie *cookie) printf("via_571_status: %s drive %d data setup=%d active=%d recovery=%d\n", unitno < 2 ? "primary" : "secondary", unitno & 1, - ((word40[3] >> ((3 - unitno) * 2)) & 3) + 1, - ((word40[2] >> (((3 - unitno) * 8) + 4)) & 0x0f) + 1, - ((word40[2] >> ((3 - unitno) * 8)) & 0x0f) + 1); + ((u_int)(word40[3] >> ((3 - unitno) * 2)) & 3) + 1, + ((u_int)(word40[2] >> (((3 - unitno) * 8) + 4)) & 0x0f) + 1, + ((u_int)(word40[2] >> ((3 - unitno) * 8)) & 0x0f) + 1); if (ctlr == 0) printf("via_571_status: primary ctrl active=%d recovery=%d\n", - ((word40[3] >> 28) & 0x0f) + 1, - ((word40[2] >> 24) & 0x0f) + 1); + ((u_int)(word40[3] >> 28) & 0x0f) + 1, + ((u_int)(word40[2] >> 24) & 0x0f) + 1); else printf("via_571_status: secondary ctrl active=%d recovery=%d\n", - ((word40[3] >> 20) & 0x0f) + 1, - ((word40[2] >> 16) & 0x0f) + 1); + ((u_int)(word40[3] >> 20) & 0x0f) + 1, + ((u_int)(word40[2] >> 16) & 0x0f) + 1); /* UltraDMA dump */ { @@ -505,9 +505,12 @@ promise_status(struct ide_pci_cookie *cookie) lat_and_interrupt = pci_conf_read(tag, 0x3c); printf("promise_status: port0: 0x%lx, port0_alt: 0x%lx, port1: 0x%lx, port1_alt: 0x%lx\n", - port0_command, port0_altstatus, port1_command, port1_altstatus); - printf("promise_status: dma control blk address: 0x%lx, int: %d, irq: %d\n", - dma_block, (lat_and_interrupt >> 8) & 0xff, lat_and_interrupt & 0xff); + (u_long)port0_command, (u_long)port0_altstatus, (u_long)port1_command, + (u_long)port1_altstatus); + printf( + "promise_status: dma control blk address: 0x%lx, int: %d, irq: %d\n", + (u_long)dma_block, (u_int)(lat_and_interrupt >> 8) & 0xff, + (u_int)lat_and_interrupt & 0xff); for(i=0;i<4;i+=2) { drivetiming = pci_conf_read(tag, 0x60 + i * 4); @@ -1241,7 +1244,7 @@ ide_pci_dmaverify(void *xcp, char *vaddr, u_long count, int dir) #ifdef DIAGNOSTIC if (badfu) { printf("ide_pci: dmaverify odd vaddr or length, "); - printf("vaddr = %08x length = %08x\n", (int)vaddr, count); + printf("vaddr = %p length = %08lx\n", (void *)vaddr, count); } #endif return (!badfu); @@ -1274,7 +1277,7 @@ ide_pci_dmasetup(void *xcp, char *vaddr, u_long vcount, int dir) if (count == 0) { printf("ide_pci: dmasetup 0-length transfer, "); - printf("vaddr = %08x length = %08x\n", (int)vaddr, count); + printf("vaddr = %p length = %08lx\n", (void *)vaddr, count); return 1; } diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 92dedfa..9142bf3 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.117 1998/04/17 22:37:04 des Exp $ +** $Id: ncr.c,v 1.118 1998/06/07 17:12:40 dfr Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -1342,7 +1342,7 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.117 1998/04/17 22:37:04 des Exp $\n"; + "\n$Id: ncr.c,v 1.118 1998/06/07 17:12:40 dfr Exp $\n"; static const u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 @@ -4114,8 +4114,8 @@ static int32_t ncr_start (struct scsi_xfer * xp) if ((unsigned)xp->datalen > 128*1024*1024) { PRINT_ADDR(xp); - printf ("trying to transfer %8x bytes, mem addr = %8x\n", - xp->datalen, xp->data); + printf ("trying to transfer %8lx bytes, mem addr = %8p\n", + (u_long) xp->datalen, (void *) xp->data); { int j; PRINT_ADDR(xp); @@ -6052,8 +6052,9 @@ static void ncr_int_ma (ncb_p np, u_char dstat) return; } if (cp != np->header.cp) { - printf ("%s: SCSI phase error fixup: CCB address mismatch (0x%08lx != 0x%08lx) np->ccb = 0x%08lx\n", - ncr_name (np), (u_long) cp, (u_long) np->header.cp, np->ccb); + printf ("%s: SCSI phase error fixup: CCB address mismatch (%p != %p) np->ccb = %p\n", + ncr_name (np), (void *) cp, (void *) np->header.cp, + (void *) np->ccb); /* return;*/ } @@ -7470,7 +7471,7 @@ ncrgetfreq (ncb_p np, int gen) OUTB (nc_scntl3, 0); if (bootverbose >= 2) - printf ("\tDelay (GEN=%d): %lu msec\n", gen, ms); + printf ("\tDelay (GEN=%d): %d msec\n", gen, ms); /* * adjust for prescaler, and convert into KHz */ @@ -7498,7 +7499,7 @@ static void ncr_getclock (ncb_p np, u_char multiplier) f2 = ncrgetfreq (np, 11); if (bootverbose >= 2) - printf ("\tNCR clock is %luKHz, %luKHz\n", f1, f2); + printf ("\tNCR clock is %uKHz, %uKHz\n", f1, f2); if (f1 > f2) f1 = f2; /* trust lower result */ if (f1 > 45000) { scntl3 = 5; /* >45Mhz: assume 80MHz */ |