Fix GCC3'ism's

This commit is contained in:
matt 2003-09-29 22:54:28 +00:00
parent ffa9f8f5aa
commit de203a6459
5 changed files with 23 additions and 22 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: crl.c,v 1.17 2003/08/07 16:30:17 agc Exp $ */
/* $NetBSD: crl.c,v 1.18 2003/09/29 22:54:28 matt Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
* All rights reserved.
@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: crl.c,v 1.17 2003/08/07 16:30:17 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: crl.c,v 1.18 2003/09/29 22:54:28 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -270,7 +270,7 @@ crlintr(arg)
break;
case CRL_S_HWERR:
printf("crl: hard error sn" PRId64 "\n", bp->b_blkno);
printf("crl: hard error sn%" PRId64 "\n", bp->b_blkno);
crltab.crl_active = CRL_F_ABORT;
mtpr(STXCS_IE | CRL_F_ABORT, PR_STXCS);
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: in4_cksum.c,v 1.7 2003/08/07 16:30:18 agc Exp $ */
/* $NetBSD: in4_cksum.c,v 1.8 2003/09/29 22:54:28 matt Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: in4_cksum.c,v 1.7 2003/08/07 16:30:18 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: in4_cksum.c,v 1.8 2003/09/29 22:54:28 matt Exp $");
#include <sys/param.h>
#include <sys/mbuf.h>
@ -125,14 +125,15 @@ in4_cksum(struct mbuf *m, u_int8_t nxt, int off, int len)
panic("in4_cksum: bad mbuf chain");
#endif
__asm __volatile("
movzwl 16(%%ap),%0 # mov len to sum
addb2 8(%%ap),%0 # add proto to sum
rotl $8,%0,%0 # htons, carry is preserved
adwc 12(%2),%0 # add src ip
adwc 16(%2),%0 # add dst ip
adwc $0,%0 # clean up carry
" : "=r" (sum) : "0" (sum), "r" (mtod(m, void *)));
__asm __volatile(
"movzwl 16(%%ap),%0;" /* mov len to sum */
"addb2 8(%%ap),%0;" /* add proto to sum */
"rotl $8,%0,%0;" /* htons, carry is preserved */
"adwc 12(%2),%0;" /* add src ip */
"adwc 16(%2),%0;" /* add dst ip */
"adwc $0,%0;" /* clean up carry */
: "=r" (sum)
: "0" (sum), "r" (mtod(m, void *)));
}
/* skip unnecessary part */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ka820.c,v 1.38 2003/08/07 16:30:19 agc Exp $ */
/* $NetBSD: ka820.c,v 1.39 2003/09/29 22:54:28 matt Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ka820.c,v 1.38 2003/08/07 16:30:19 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: ka820.c,v 1.39 2003/09/29 22:54:28 matt Exp $");
#include "opt_multiprocessor.h"
@ -569,7 +569,7 @@ ka820_startslave(struct device *dev, struct cpu_info *ci)
if ((volatile int)ci->ci_flags & CI_RUNNING)
break;
if (i == 10000)
printf("%s: (ID %d) failed starting??!!??\n",
printf("%s: (ID %d) failed starting??\n",
dev->dv_xname, sc->sc_binid);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.140 2003/09/29 21:04:53 matt Exp $ */
/* $NetBSD: machdep.c,v 1.141 2003/09/29 22:54:28 matt Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.140 2003/09/29 21:04:53 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.141 2003/09/29 22:54:28 matt Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@ -222,7 +222,7 @@ cpu_startup()
size = MAXBSIZE * nbuf; /* # bytes for buffers */
/* allocate VM for buffers... area is not managed by VM system */
if (uvm_map(kernel_map, (vaddr_t *) &buffers, round_page(size),
if (uvm_map(kernel_map, (vaddr_t *)(void *) &buffers, round_page(size),
NULL, UVM_UNKNOWN_OFFSET, 0,
UVM_MAPFLAG(UVM_PROT_NONE, UVM_PROT_NONE, UVM_INH_NONE,
UVM_ADV_NORMAL, 0)) != 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: vsbus_dma.c,v 1.9 2003/07/15 02:15:07 lukem Exp $ */
/* $NetBSD: vsbus_dma.c,v 1.10 2003/09/29 22:54:28 matt Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vsbus_dma.c,v 1.9 2003/07/15 02:15:07 lukem Exp $");
__KERNEL_RCSID(0, "$NetBSD: vsbus_dma.c,v 1.10 2003/09/29 22:54:28 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -123,7 +123,7 @@ vsbus_dma_init(sc, ptecnt)
}
error = bus_dmamem_map(t, segs, nsegs, mapsize,
(caddr_t *) &pte, BUS_DMA_NOWAIT|BUS_DMA_COHERENT);
(caddr_t *)(void *) &pte, BUS_DMA_NOWAIT|BUS_DMA_COHERENT);
if (error) {
panic("vsbus_dma_init: error mapping memory for "
"hw sgmap: error=%d", error);