diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-09-26 14:32:08 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-09-26 14:32:08 +0000 |
commit | 9ffada0ebab26967bb0bfa3cbb491e569be90819 (patch) | |
tree | 9012b837dcb39ee68aea3948f240778216ce9054 /sys/arch/loongson | |
parent | 9a9763e9f2a6b623329d70a1076392bb35f79658 (diff) |
Use correct format specifiers in various loongson machine dependent code.
Makes a loongson kernel buildable without -Wno-format.
ok miod@ jsg@
Diffstat (limited to 'sys/arch/loongson')
-rw-r--r-- | sys/arch/loongson/dev/bonito.c | 6 | ||||
-rw-r--r-- | sys/arch/loongson/loongson/bus_dma.c | 6 | ||||
-rw-r--r-- | sys/arch/loongson/loongson/machdep.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/loongson/dev/bonito.c b/sys/arch/loongson/dev/bonito.c index b4b390b33dd..be670c84fb2 100644 --- a/sys/arch/loongson/dev/bonito.c +++ b/sys/arch/loongson/dev/bonito.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bonito.c,v 1.27 2014/07/12 18:44:42 tedu Exp $ */ +/* $OpenBSD: bonito.c,v 1.28 2014/09/26 14:32:07 jsing Exp $ */ /* $NetBSD: bonito_mainbus.c,v 1.11 2008/04/28 20:23:10 martin Exp $ */ /* $NetBSD: bonito_pci.c,v 1.5 2008/04/28 20:23:28 martin Exp $ */ @@ -976,10 +976,10 @@ bonito_pci_intr_string(void *cookie, pci_intr_handle_t ih) static char irqstr[1 + 12]; if (BONITO_IRQ_IS_ISA(ih)) - snprintf(irqstr, sizeof irqstr, "isa irq %d", + snprintf(irqstr, sizeof irqstr, "isa irq %lu", BONITO_IRQ_TO_ISA(ih)); else - snprintf(irqstr, sizeof irqstr, "irq %d", ih); + snprintf(irqstr, sizeof irqstr, "irq %lu", ih); return irqstr; } diff --git a/sys/arch/loongson/loongson/bus_dma.c b/sys/arch/loongson/loongson/bus_dma.c index 5c3f2decd2b..80faf59c1ed 100644 --- a/sys/arch/loongson/loongson/bus_dma.c +++ b/sys/arch/loongson/loongson/bus_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bus_dma.c,v 1.16 2014/09/13 16:06:36 doug Exp $ */ +/* $OpenBSD: bus_dma.c,v 1.17 2014/09/26 14:32:07 jsing Exp $ */ /* * Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -572,8 +572,8 @@ _dmamap_load_buffer(bus_dma_tag_t t, bus_dmamap_t map, void *buf, * Get the physical address for this segment. */ if (pmap_extract(pmap, vaddr, &curaddr) == FALSE) - panic("_dmapmap_load_buffer: pmap_extract(%x, %x) failed!", - pmap, vaddr); + panic("_dmapmap_load_buffer: pmap_extract(%p, %lx) " + "failed!", pmap, vaddr); /* * Compute the segment size, and adjust counts. diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c index cc589edc4c3..20be42d5561 100644 --- a/sys/arch/loongson/loongson/machdep.c +++ b/sys/arch/loongson/loongson/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.59 2014/09/20 09:28:24 kettenis Exp $ */ +/* $OpenBSD: machdep.c,v 1.60 2014/09/26 14:32:07 jsing Exp $ */ /* * Copyright (c) 2009, 2010, 2014 Miodrag Vallat. @@ -840,7 +840,7 @@ cpu_startup() * Good {morning,afternoon,evening,night}. */ printf(version); - printf("real mem = %u (%uMB)\n", ptoa((psize_t)physmem), + printf("real mem = %lu (%luMB)\n", ptoa((psize_t)physmem), ptoa((psize_t)physmem)/1024/1024); /* @@ -854,7 +854,7 @@ cpu_startup() phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, VM_PHYS_SIZE, 0, FALSE, NULL); - printf("avail mem = %u (%uMB)\n", ptoa(uvmexp.free), + printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free), ptoa(uvmexp.free)/1024/1024); /* |