From 66c94858030b4264909f2d7208252224c6abc9b1 Mon Sep 17 00:00:00 2001 From: scottr Date: Tue, 1 Apr 1997 03:10:57 +0000 Subject: [PATCH] Add prototypes, and make this compile with -Wall. --- sys/arch/hp300/dev/dma.c | 9 +++------ sys/arch/hp300/dev/dmareg.h | 7 +++++-- sys/arch/hp300/dev/dmavar.h | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/sys/arch/hp300/dev/dma.c b/sys/arch/hp300/dev/dma.c index 2e91a87b844f..f16f0b7b29a4 100644 --- a/sys/arch/hp300/dev/dma.c +++ b/sys/arch/hp300/dev/dma.c @@ -1,4 +1,4 @@ -/* $NetBSD: dma.c,v 1.13 1997/03/31 07:32:18 scottr Exp $ */ +/* $NetBSD: dma.c,v 1.14 1997/04/01 03:10:57 scottr Exp $ */ /* * Copyright (c) 1995, 1996, 1997 @@ -48,6 +48,7 @@ #include #include +#include #include #include @@ -55,9 +56,6 @@ #include -extern u_int kvtop(); -extern void PCIA(); - /* * The largest single request will be MAXPHYS bytes which will require * at most MAXPHYS/NBPG+1 chain elements to describe, i.e. if none of @@ -362,7 +360,7 @@ dmago(unit, addr, count, flags) * Push back dirty cache lines */ if (mmutype == MMU_68040) - DCFP(dc->dm_chain[seg].dc_addr); + DCFP((vm_offset_t)dc->dm_chain[seg].dc_addr); #endif if (count < (tcount = NBPG - ((int)addr & PGOFSET))) tcount = count; @@ -470,7 +468,6 @@ dmastop(unit) { struct dma_softc *sc = &Dma_softc; struct dma_channel *dc = &sc->sc_chan[unit]; - struct dmaqueue *dq; #ifdef DEBUG if (dmadebug & DDB_FOLLOW) diff --git a/sys/arch/hp300/dev/dmareg.h b/sys/arch/hp300/dev/dmareg.h index 74a02175e65b..690def598918 100644 --- a/sys/arch/hp300/dev/dmareg.h +++ b/sys/arch/hp300/dev/dmareg.h @@ -1,4 +1,4 @@ -/* $NetBSD: dmareg.h,v 1.9 1997/03/31 07:32:19 scottr Exp $ */ +/* $NetBSD: dmareg.h,v 1.10 1997/04/01 03:10:58 scottr Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -108,7 +108,10 @@ struct dmareg { * look at the 98620C status to get the extended bits. * DMA_ARM: Load address, count and kick-off DMA. */ -#define DMA_CLEAR(dc) { v_int dmaclr = (int) dc->dm_Bhwaddr->dmaB_addr; } +#define DMA_CLEAR(dc) do { \ + v_int dmaclr; \ + dmaclr = (int)dc->dm_Bhwaddr->dmaB_addr; \ + } while (0); #define DMA_STAT(dc) dc->dm_Bhwaddr->dmaB_stat #if defined(HP320) diff --git a/sys/arch/hp300/dev/dmavar.h b/sys/arch/hp300/dev/dmavar.h index 4a5482c1e662..bb900b1ad96c 100644 --- a/sys/arch/hp300/dev/dmavar.h +++ b/sys/arch/hp300/dev/dmavar.h @@ -1,4 +1,4 @@ -/* $NetBSD: dmavar.h,v 1.8 1997/03/31 07:32:20 scottr Exp $ */ +/* $NetBSD: dmavar.h,v 1.9 1997/04/01 03:10:59 scottr Exp $ */ /* * Copyright (c) 1997 Jason R. Thorpe. All rights reserved. @@ -69,6 +69,7 @@ struct dmaqueue { }; #ifdef _KERNEL +void dmainit __P((void)); void dmago __P((int, char *, int, int)); void dmastop __P((int)); void dmafree __P((struct dmaqueue *));