summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-05-08 21:17:02 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-05-08 21:17:02 +0000
commit27db5d8a65b8f6c6fb8f9e033dd5f2c49aff24ec (patch)
tree56404a9ea93a805af8ba830dda9f4910fb2bfb15 /sys
parent455da5aee242b188a5c369d8eed122ca7d794a99 (diff)
Format string fixes and removal of -Wno-format for arm kernels.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm/arm/arm32_machdep.c6
-rw-r--r--sys/arch/arm/arm/db_machdep.c14
-rw-r--r--sys/arch/arm/arm/disassem.c4
-rw-r--r--sys/arch/arm/arm/fault.c22
-rw-r--r--sys/arch/arm/arm/pmap7.c6
-rw-r--r--sys/arch/arm/xscale/pxa2x0_gpio.c4
-rw-r--r--sys/arch/arm/xscale/pxa2x0_intr.c4
-rw-r--r--sys/arch/armish/conf/Makefile.armish4
-rw-r--r--sys/arch/armish/dev/iq80321_pci.c4
-rw-r--r--sys/arch/armv7/conf/Makefile.armv74
-rw-r--r--sys/arch/armv7/omap/dmtimer.c2
-rw-r--r--sys/arch/armv7/omap/gptimer.c4
-rw-r--r--sys/arch/armv7/omap/prcm.c4
-rw-r--r--sys/arch/zaurus/conf/Makefile.zaurus4
-rw-r--r--sys/arch/zaurus/dev/scoop_pcic.c4
-rw-r--r--sys/arch/zaurus/dev/zaurus_flash.c4
-rw-r--r--sys/dev/flash.c4
17 files changed, 49 insertions, 49 deletions
diff --git a/sys/arch/arm/arm/arm32_machdep.c b/sys/arch/arm/arm/arm32_machdep.c
index f5f398e3571..88f96c204f8 100644
--- a/sys/arch/arm/arm/arm32_machdep.c
+++ b/sys/arch/arm/arm/arm32_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arm32_machdep.c,v 1.42 2014/04/03 10:17:34 mpi Exp $ */
+/* $OpenBSD: arm32_machdep.c,v 1.43 2014/05/08 21:17:00 miod Exp $ */
/* $NetBSD: arm32_machdep.c,v 1.42 2003/12/30 12:33:15 pk Exp $ */
/*
@@ -278,7 +278,7 @@ cpu_startup()
*/
printf(version);
- printf("real mem = %u (%uMB)\n", ptoa(physmem),
+ printf("real mem = %lu (%luMB)\n", ptoa(physmem),
ptoa(physmem)/1024/1024);
/*
@@ -300,7 +300,7 @@ cpu_startup()
*/
bufinit();
- printf("avail mem = %lu (%uMB)\n", ptoa(uvmexp.free),
+ printf("avail mem = %lu (%luMB)\n", ptoa(uvmexp.free),
ptoa(uvmexp.free)/1024/1024);
curpcb = &proc0.p_addr->u_pcb;
diff --git a/sys/arch/arm/arm/db_machdep.c b/sys/arch/arm/arm/db_machdep.c
index 0f16265b598..3305b04af6b 100644
--- a/sys/arch/arm/arm/db_machdep.c
+++ b/sys/arch/arm/arm/db_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.c,v 1.4 2013/05/10 22:06:10 patrick Exp $ */
+/* $OpenBSD: db_machdep.c,v 1.5 2014/05/08 21:17:00 miod Exp $ */
/* $NetBSD: db_machdep.c,v 1.8 2003/07/15 00:24:41 lukem Exp $ */
/*
@@ -53,14 +53,14 @@ db_show_frame_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif)
frame = (struct trapframe *)addr;
db_printf("frame address = %08x ", (u_int)frame);
- db_printf("spsr=%08x\n", frame->tf_spsr);
- db_printf("r0 =%08x r1 =%08x r2 =%08x r3 =%08x\n",
+ db_printf("spsr=%08lx\n", frame->tf_spsr);
+ db_printf("r0 =%08lx r1 =%08lx r2 =%08lx r3 =%08lx\n",
frame->tf_r0, frame->tf_r1, frame->tf_r2, frame->tf_r3);
- db_printf("r4 =%08x r5 =%08x r6 =%08x r7 =%08x\n",
+ db_printf("r4 =%08lx r5 =%08lx r6 =%08lx r7 =%08lx\n",
frame->tf_r4, frame->tf_r5, frame->tf_r6, frame->tf_r7);
- db_printf("r8 =%08x r9 =%08x r10=%08x r11=%08x\n",
+ db_printf("r8 =%08lx r9 =%08lx r10=%08lx r11=%08lx\n",
frame->tf_r8, frame->tf_r9, frame->tf_r10, frame->tf_r11);
- db_printf("r12=%08x r13=%08x r14=%08x r15=%08x\n",
+ db_printf("r12=%08lx r13=%08lx r14=%08lx r15=%08lx\n",
frame->tf_r12, frame->tf_usr_sp, frame->tf_usr_lr, frame->tf_pc);
- db_printf("slr=%08x\n", frame->tf_svc_lr);
+ db_printf("slr=%08lx\n", frame->tf_svc_lr);
}
diff --git a/sys/arch/arm/arm/disassem.c b/sys/arch/arm/arm/disassem.c
index a73db557e09..a33101c7486 100644
--- a/sys/arch/arm/arm/disassem.c
+++ b/sys/arch/arm/arm/disassem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disassem.c,v 1.2 2011/11/10 17:46:18 miod Exp $ */
+/* $OpenBSD: disassem.c,v 1.3 2014/05/08 21:17:00 miod Exp $ */
/* $NetBSD: disassem.c,v 1.14 2003/03/27 16:58:36 mycroft Exp $ */
/*
@@ -674,7 +674,7 @@ disassemble_readword(db_expr_t address)
static void
disassemble_printaddr(db_expr_t address)
{
- db_printf("0x%08x", address);
+ db_printf("0x%08lx", address);
}
static const disasm_interface_t disassemble_di = {
diff --git a/sys/arch/arm/arm/fault.c b/sys/arch/arm/arm/fault.c
index 79d0d463c87..c3802ec5cf1 100644
--- a/sys/arch/arm/arm/fault.c
+++ b/sys/arch/arm/arm/fault.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fault.c,v 1.16 2014/04/18 11:51:16 guenther Exp $ */
+/* $OpenBSD: fault.c,v 1.17 2014/05/08 21:17:00 miod Exp $ */
/* $NetBSD: fault.c,v 1.46 2004/01/21 15:39:21 skrll Exp $ */
/*
@@ -471,29 +471,29 @@ dab_fatal(trapframe_t *tf, u_int fsr, u_int far, struct proc *p,
if ((fsr & FAULT_IMPRECISE) != 0)
printf(" (imprecise)");
#endif
- printf(", spsr=%08x\n", tf->tf_spsr);
+ printf(", spsr=%08lx\n", tf->tf_spsr);
} else {
- printf("Fatal %s mode prefetch abort at 0x%08x\n",
+ printf("Fatal %s mode prefetch abort at 0x%08lx\n",
mode, tf->tf_pc);
- printf("trapframe: %p\nIFSR=%08x, IFAR=%08x, spsr=%08x\n",
+ printf("trapframe: %p\nIFSR=%08x, IFAR=%08x, spsr=%08lx\n",
tf, fsr, far, tf->tf_spsr);
}
- printf("r0 =%08x, r1 =%08x, r2 =%08x, r3 =%08x\n",
+ printf("r0 =%08lx, r1 =%08lx, r2 =%08lx, r3 =%08lx\n",
tf->tf_r0, tf->tf_r1, tf->tf_r2, tf->tf_r3);
- printf("r4 =%08x, r5 =%08x, r6 =%08x, r7 =%08x\n",
+ printf("r4 =%08lx, r5 =%08lx, r6 =%08lx, r7 =%08lx\n",
tf->tf_r4, tf->tf_r5, tf->tf_r6, tf->tf_r7);
- printf("r8 =%08x, r9 =%08x, r10=%08x, r11=%08x\n",
+ printf("r8 =%08lx, r9 =%08lx, r10=%08lx, r11=%08lx\n",
tf->tf_r8, tf->tf_r9, tf->tf_r10, tf->tf_r11);
- printf("r12=%08x, ", tf->tf_r12);
+ printf("r12=%08lx, ", tf->tf_r12);
if (TRAP_USERMODE(tf))
- printf("usp=%08x, ulr=%08x",
+ printf("usp=%08lx, ulr=%08lx",
tf->tf_usr_sp, tf->tf_usr_lr);
else
- printf("ssp=%08x, slr=%08x",
+ printf("ssp=%08lx, slr=%08lx",
tf->tf_svc_sp, tf->tf_svc_lr);
- printf(", pc =%08x\n\n", tf->tf_pc);
+ printf(", pc =%08lx\n\n", tf->tf_pc);
#if defined(DDB) || defined(KGDB)
kdb_trap(T_FAULT, tf);
diff --git a/sys/arch/arm/arm/pmap7.c b/sys/arch/arm/arm/pmap7.c
index 14a4c3aae31..bd973160779 100644
--- a/sys/arch/arm/arm/pmap7.c
+++ b/sys/arch/arm/arm/pmap7.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap7.c,v 1.13 2014/03/29 18:09:28 guenther Exp $ */
+/* $OpenBSD: pmap7.c,v 1.14 2014/05/08 21:17:00 miod Exp $ */
/* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */
/*
@@ -2049,7 +2049,7 @@ pmap_fault_fixup(pmap_t pm, vaddr_t va, vm_prot_t ftype, int user)
pa = l2pte_pa(pte);
if ((ftype & VM_PROT_EXECUTE) && (pte & L2_V7_S_XN)) {
-printf("%s: va %08x ftype %x %c pte %08x\n", __func__, va, ftype, user ? 'u' : 's', pte);
+printf("%s: va %08lx ftype %x %c pte %08x\n", __func__, va, ftype, user ? 'u' : 's', pte);
printf("fault on exec\n");
Debugger();
/* XXX FIX THIS */
@@ -2130,7 +2130,7 @@ Debugger();
PTE_SYNC(ptep);
rv = 1;
} else {
-printf("%s: va %08x ftype %x %c pte %08x\n", __func__, va, ftype, user ? 'u' : 's', pte);
+printf("%s: va %08lx ftype %x %c pte %08x\n", __func__, va, ftype, user ? 'u' : 's', pte);
goto out;
}
diff --git a/sys/arch/arm/xscale/pxa2x0_gpio.c b/sys/arch/arm/xscale/pxa2x0_gpio.c
index 9d94b3d4273..23b77322da4 100644
--- a/sys/arch/arm/xscale/pxa2x0_gpio.c
+++ b/sys/arch/arm/xscale/pxa2x0_gpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_gpio.c,v 1.22 2010/09/20 06:33:47 matthew Exp $ */
+/* $OpenBSD: pxa2x0_gpio.c,v 1.23 2014/05/08 21:17:00 miod Exp $ */
/* $NetBSD: pxa2x0_gpio.c,v 1.2 2003/07/15 00:24:55 lukem Exp $ */
/*
@@ -399,7 +399,7 @@ pxa2x0_gpio_intr_string(void *cookie)
if (gh == NULL)
snprintf(irqstr, sizeof irqstr, "couldn't establish interrupt");
else
- snprintf(irqstr, sizeof irqstr, "irq %ld", gh->gh_irq);
+ snprintf(irqstr, sizeof irqstr, "irq %d", gh->gh_irq);
return(irqstr);
}
diff --git a/sys/arch/arm/xscale/pxa2x0_intr.c b/sys/arch/arm/xscale/pxa2x0_intr.c
index d1b0798cb9f..633436b4c36 100644
--- a/sys/arch/arm/xscale/pxa2x0_intr.c
+++ b/sys/arch/arm/xscale/pxa2x0_intr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pxa2x0_intr.c,v 1.24 2014/03/29 18:09:28 guenther Exp $ */
+/* $OpenBSD: pxa2x0_intr.c,v 1.25 2014/05/08 21:17:00 miod Exp $ */
/* $NetBSD: pxa2x0_intr.c,v 1.5 2003/07/15 00:24:55 lukem Exp $ */
/*
@@ -706,7 +706,7 @@ pxa2x0_intr_string(void *cookie)
if (ih == NULL)
snprintf(irqstr, sizeof irqstr, "couldn't establish interrupt");
else
- snprintf(irqstr, sizeof irqstr, "irq %ld", ih->ih_irq);
+ snprintf(irqstr, sizeof irqstr, "irq %d", ih->ih_irq);
return irqstr;
}
diff --git a/sys/arch/armish/conf/Makefile.armish b/sys/arch/armish/conf/Makefile.armish
index a3556a363ae..9a27f721c81 100644
--- a/sys/arch/armish/conf/Makefile.armish
+++ b/sys/arch/armish/conf/Makefile.armish
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.armish,v 1.47 2013/10/15 19:23:25 guenther Exp $
+# $OpenBSD: Makefile.armish,v 1.48 2014/05/08 21:17:01 miod Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -24,7 +24,7 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I$S -I. -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-main -Wno-uninitialized -Wno-format \
+ -Wno-main -Wno-uninitialized \
-Wstack-larger-than-2047
CMACHFLAGS= -ffreestanding -msoft-float # -march=armv4 -mtune=strongarm
diff --git a/sys/arch/armish/dev/iq80321_pci.c b/sys/arch/armish/dev/iq80321_pci.c
index 881d1a6cfa1..aa6bdecad72 100644
--- a/sys/arch/armish/dev/iq80321_pci.c
+++ b/sys/arch/armish/dev/iq80321_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iq80321_pci.c,v 1.10 2009/08/22 02:54:50 mk Exp $ */
+/* $OpenBSD: iq80321_pci.c,v 1.11 2014/05/08 21:17:01 miod Exp $ */
/* $NetBSD: iq80321_pci.c,v 1.5 2005/12/11 12:17:09 christos Exp $ */
/*
@@ -262,7 +262,7 @@ iq80321_pci_intr_string(void *v, pci_intr_handle_t ih)
{
static char irqname[32];
- snprintf(irqname, sizeof irqname, "irq %d", ih);
+ snprintf(irqname, sizeof irqname, "irq %ld", ih);
return (irqname);
}
diff --git a/sys/arch/armv7/conf/Makefile.armv7 b/sys/arch/armv7/conf/Makefile.armv7
index 45dc4f44c0a..2610fa298ab 100644
--- a/sys/arch/armv7/conf/Makefile.armv7
+++ b/sys/arch/armv7/conf/Makefile.armv7
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.armv7,v 1.3 2014/02/02 03:59:25 miod Exp $
+# $OpenBSD: Makefile.armv7,v 1.4 2014/05/08 21:17:01 miod Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -24,7 +24,7 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I$S -I. -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-main -Wno-uninitialized -Wno-format \
+ -Wno-main -Wno-uninitialized \
-Wstack-larger-than-2047
CMACHFLAGS= -ffreestanding -msoft-float -march=armv6
diff --git a/sys/arch/armv7/omap/dmtimer.c b/sys/arch/armv7/omap/dmtimer.c
index e7dd984e335..b8fbe794854 100644
--- a/sys/arch/armv7/omap/dmtimer.c
+++ b/sys/arch/armv7/omap/dmtimer.c
@@ -194,7 +194,7 @@ dmtimer_attach(struct device *parent, struct device *self, void *args)
dmtimer_setstatclockrate, NULL);
}
else
- panic("attaching too many dmtimers at 0x%x",
+ panic("attaching too many dmtimers at 0x%lx",
aa->aa_dev->mem[0].addr);
/* set IDLEMODE to smart-idle */
diff --git a/sys/arch/armv7/omap/gptimer.c b/sys/arch/armv7/omap/gptimer.c
index 59874c0ffc7..a750cf51c5f 100644
--- a/sys/arch/armv7/omap/gptimer.c
+++ b/sys/arch/armv7/omap/gptimer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gptimer.c,v 1.2 2013/11/06 19:03:07 syl Exp $ */
+/* $OpenBSD: gptimer.c,v 1.3 2014/05/08 21:17:01 miod Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -171,7 +171,7 @@ gptimer_attach(struct device *parent, struct device *self, void *args)
tc_init(&gptimer_timecounter);
}
else
- panic("attaching too many gptimers at 0x%x",
+ panic("attaching too many gptimers at 0x%lx",
aa->aa_dev->mem[0].addr);
arm_clock_register(gptimer_cpu_initclocks, gptimer_delay,
diff --git a/sys/arch/armv7/omap/prcm.c b/sys/arch/armv7/omap/prcm.c
index f6ca5407005..52b39c4c71c 100644
--- a/sys/arch/armv7/omap/prcm.c
+++ b/sys/arch/armv7/omap/prcm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prcm.c,v 1.8 2014/03/18 07:34:17 syl Exp $ */
+/* $OpenBSD: prcm.c,v 1.9 2014/05/08 21:17:01 miod Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -443,7 +443,7 @@ prcm_v4_hsusbhost_activate(int type)
break;
default:
- panic("%s: invalid type %d", type);
+ panic("%s: invalid type %d", __func__, type);
return (EINVAL);
}
bus_space_write_4(sc->sc_iot, sc->sc_cm2, clksel_reg_off, clksel);
diff --git a/sys/arch/zaurus/conf/Makefile.zaurus b/sys/arch/zaurus/conf/Makefile.zaurus
index f6388dfb7da..dd6e8050fc0 100644
--- a/sys/arch/zaurus/conf/Makefile.zaurus
+++ b/sys/arch/zaurus/conf/Makefile.zaurus
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.zaurus,v 1.50 2014/02/12 05:31:58 miod Exp $
+# $OpenBSD: Makefile.zaurus,v 1.51 2014/05/08 21:17:01 miod Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -24,7 +24,7 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I$S -I. -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__ -MD -MP
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-main -Wno-uninitialized -Wno-format \
+ -Wno-main -Wno-uninitialized \
-Wstack-larger-than-2047
CMACHFLAGS= -ffreestanding -msoft-float # -march=armv4 -mtune=strongarm
diff --git a/sys/arch/zaurus/dev/scoop_pcic.c b/sys/arch/zaurus/dev/scoop_pcic.c
index aaa50bea02c..c0672c5e61c 100644
--- a/sys/arch/zaurus/dev/scoop_pcic.c
+++ b/sys/arch/zaurus/dev/scoop_pcic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scoop_pcic.c,v 1.4 2014/04/03 10:17:34 mpi Exp $ */
+/* $OpenBSD: scoop_pcic.c,v 1.5 2014/05/08 21:17:01 miod Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de>
@@ -105,7 +105,7 @@ scoop_pcic_socket_setup(struct pxapcic_socket *so)
error = bus_space_map(iot, trunc_page(pa), round_page(size),
0, &scooph);
if (error)
- panic("%s: can't map memory %x for scoop",
+ panic("%s: can't map memory %lx for scoop",
sc->sc_dev.dv_xname, pa);
scooph += pa - trunc_page(pa);
diff --git a/sys/arch/zaurus/dev/zaurus_flash.c b/sys/arch/zaurus/dev/zaurus_flash.c
index 39a20051a57..8ded12ef0c5 100644
--- a/sys/arch/zaurus/dev/zaurus_flash.c
+++ b/sys/arch/zaurus/dev/zaurus_flash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zaurus_flash.c,v 1.11 2013/06/28 18:20:04 miod Exp $ */
+/* $OpenBSD: zaurus_flash.c,v 1.12 2014/05/08 21:17:01 miod Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
@@ -641,7 +641,7 @@ zflash_safe_start(struct zflash_softc *sc, dev_t dev)
break;
}
- DPRINTF(("pblks %u lblks %u\n", sp->sp_pblks, sp->sp_lblks));
+ DPRINTF(("pblks %lu lblks %lu\n", sp->sp_pblks, sp->sp_lblks));
/* Next physical block to use; randomize for wear-leveling. */
sp->sp_pnext = arc4random_uniform(sp->sp_pblks);
diff --git a/sys/dev/flash.c b/sys/dev/flash.c
index 56c6bc18061..cd2821bbb94 100644
--- a/sys/dev/flash.c
+++ b/sys/dev/flash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: flash.c,v 1.29 2013/11/11 03:03:34 dlg Exp $ */
+/* $OpenBSD: flash.c,v 1.30 2014/05/08 21:17:00 miod Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
@@ -621,7 +621,7 @@ flash_chip_verify_block(struct flash_softc *sc, long blkno, caddr_t data,
while (pageno < blkend) {
error = flash_chip_verify_page(sc, pageno, data, oob);
if (error != 0) {
- printf("block %d page %d verify failed\n",
+ printf("block %ld page %ld verify failed\n",
blkno, pageno);
return error;
}