Some cleanup.

- Add missing return-type of function.
- Add missing prototype.
- some gcc -Wall printf warning.
This commit is contained in:
oki 1996-05-21 15:31:55 +00:00
parent 68188bee78
commit 82d5960cd6
4 changed files with 27 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: com.c,v 1.1.1.1 1996/05/05 12:17:03 oki Exp $ */
/* $NetBSD: com.c,v 1.2 1996/05/21 15:31:55 oki Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1996
@ -117,6 +117,7 @@ int comintr __P((void *));
void compoll __P((void *));
int comparam __P((struct tty *, struct termios *));
void comstart __P((struct tty *));
void cominit __P((int, int));
struct cfattach com_ca = {
sizeof(struct com_softc), comprobe, comattach,
@ -357,7 +358,7 @@ comattach(parent, dev, aux)
if (comconsole == unit)
kgdb_dev = -1; /* can't debug over console port */
else {
(void) cominit(unit, kgdb_rate);
cominit(unit, kgdb_rate);
if (kgdb_debug_init) {
/*
* Print prefix of device name,
@ -1141,6 +1142,7 @@ comcninit(cp)
comconsinit = 0;
}
void
cominit(unit, rate)
int unit, rate;
{
@ -1159,6 +1161,7 @@ cominit(unit, rate)
splx(s);
}
int
comcngetc(dev)
dev_t dev;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: fd.c,v 1.1.1.1 1996/05/05 12:17:03 oki Exp $ */
/* $NetBSD: fd.c,v 1.2 1996/05/21 15:32:02 oki Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles Hannum.
@ -255,7 +255,7 @@ fdc_dmastart(read, addr, count)
{
volatile struct dmac *dmac = &IODEVbase->io_dma[DRQ];
DPRINTF(("fdc_dmastart: (%s, addr = %x, count = %d\n",
DPRINTF(("fdc_dmastart: (%s, addr = %p, count = %d\n",
read ? "read" : "write", addr, count));
if (dmarangecheck((vm_offset_t)addr, count)) {
dma_bouncebytes[DRQ] = count;
@ -580,7 +580,7 @@ fdstrategy(bp)
bp->b_cylin = bp->b_blkno / (FDC_BSIZE / DEV_BSIZE)
/ (fd->sc_type->seccyl * (1 << (fd->sc_type->secsize - 2)));
DPRINTF(("fdstrategy: %s b_blkno %d b_bcount %d cylin %d\n",
DPRINTF(("fdstrategy: %s b_blkno %d b_bcount %ld cylin %ld\n",
bp->b_flags & B_READ ? "read" : "write",
bp->b_blkno, bp->b_bcount, bp->b_cylin));
/* Queue transfer on drive, activate drive and controller if idle. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf.c,v 1.1.1.1 1996/05/05 12:17:03 oki Exp $ */
/* $NetBSD: grf.c,v 1.2 1996/05/21 15:32:06 oki Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -49,6 +49,7 @@
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
@ -92,6 +93,7 @@ int grfdebug = 0;
struct cfdriver grf_cd;
/*ARGSUSED*/
int
grfopen(dev, flags)
dev_t dev;
int flags;
@ -132,6 +134,7 @@ grfopen(dev, flags)
}
/*ARGSUSED*/
int
grfclose(dev, flags)
dev_t dev;
int flags;
@ -147,6 +150,7 @@ grfclose(dev, flags)
}
/*ARGSUSED*/
int
grfioctl(dev, cmd, data, flag, p)
dev_t dev;
u_long cmd;
@ -200,6 +204,7 @@ grfioctl(dev, cmd, data, flag, p)
}
/*ARGSUSED*/
int
grfselect(dev, rw)
dev_t dev;
int rw;
@ -210,13 +215,15 @@ grfselect(dev, rw)
}
/*ARGSUSED*/
int
grfmmap(dev, off, prot)
dev_t dev;
int off, prot;
{
return(grfaddr(grf_cd.cd_devs[GRFUNIT(dev)], off));
return (grfaddr(grf_cd.cd_devs[GRFUNIT(dev)], off));
}
int
grfon(dev)
dev_t dev;
{
@ -234,6 +241,7 @@ grfon(dev)
(caddr_t)0));
}
int
grfoff(dev)
dev_t dev;
{
@ -250,6 +258,7 @@ grfoff(dev)
return(error);
}
int
grfaddr(gp, off)
struct grf_softc *gp;
register int off;
@ -497,6 +506,7 @@ grfdevno(dev)
#endif /* COMPAT_HPUX */
int
grfmap(dev, addrp, p)
dev_t dev;
caddr_t *addrp;
@ -510,7 +520,7 @@ grfmap(dev, addrp, p)
#ifdef DEBUG
if (grfdebug & GDB_MMAP)
printf("grfmap(%d): addr %x\n", p->p_pid, *addrp);
printf("grfmap(%d): addr %p\n", p->p_pid, *addrp);
#endif
len = gp->g_display.gd_regsize + gp->g_display.gd_fbsize;
flags = MAP_SHARED;
@ -529,6 +539,7 @@ grfmap(dev, addrp, p)
return(error);
}
int
grfunmap(dev, addr, p)
dev_t dev;
caddr_t addr;
@ -540,7 +551,7 @@ grfunmap(dev, addr, p)
#ifdef DEBUG
if (grfdebug & GDB_MMAP)
printf("grfunmap(%d): dev %x addr %x\n", p->p_pid, dev, addr);
printf("grfunmap(%d): dev %x addr %p\n", p->p_pid, dev, addr);
#endif
if (addr == 0)
return(EINVAL); /* XXX: how do we deal with this? */

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_machdep.c,v 1.1.1.1 1996/05/05 12:17:03 oki Exp $ */
/* $NetBSD: grf_machdep.c,v 1.2 1996/05/21 15:32:11 oki Exp $ */
/*
* Copyright (c) 1991 University of Utah.
@ -48,6 +48,7 @@
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
#include <x68k/dev/grfioctl.h>
@ -151,6 +152,7 @@ static struct grf_softc congrf;
* XXX called from ite console init routine.
* Does just what configure will do later but without printing anything.
*/
void
grfconfig(dp)
struct device *dp;
{
@ -224,6 +226,7 @@ char *pnp;
return(UNCONF);
}
int
grfinit(dp, unit)
void *dp;
int unit;