Remove unused variables.

Correct printf format strings.
This commit is contained in:
minoura 2001-11-25 16:00:05 +00:00
parent 2b74082b7b
commit bbfb453233
4 changed files with 28 additions and 39 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: intio_dmac.c,v 1.11 2001/05/27 02:18:07 minoura Exp $ */
/* $NetBSD: intio_dmac.c,v 1.12 2001/11/25 16:00:05 minoura Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@ -139,7 +139,6 @@ dmac_init_channels(sc)
struct dmac_softc *sc;
{
int i;
pmap_t pmap = pmap_kernel();
DPRINTF (3, ("dmac_init_channels\n"));
for (i=0; i<DMAC_NCHAN; i++) {
@ -177,7 +176,9 @@ dmac_alloc_channel(self, ch, name,
struct dmac_softc *sc = (void*) intio->sc_dmac;
struct dmac_channel_stat *chan = &sc->sc_channels[ch];
char intrname[16];
#ifdef DMAC_ARRAYCHAIN
int r, dummy;
#endif
printf ("%s: allocating ch %d for %s.\n",
sc->sc_dev.dv_xname, ch, name);
@ -293,7 +294,6 @@ dmac_alloc_xfer (chan, dmat, dmamap)
bus_dmamap_t dmamap;
{
struct dmac_dma_xfer *xf = &chan->ch_xfer;
struct dmac_softc *sc = (struct dmac_softc*) chan->ch_softc;
DPRINTF (3, ("dmac_alloc_xfer\n"));
xf->dx_channel = chan;
@ -389,7 +389,10 @@ dmac_start_xfer_offset(self, xf, offset, size)
struct dmac_softc *sc = (void*) self;
struct dmac_channel_stat *chan = xf->dx_channel;
struct x68k_bus_dmamap *dmamap = xf->dx_dmamap;
int c, go = DMAC_CCR_STR|DMAC_CCR_INT;
int go = DMAC_CCR_STR|DMAC_CCR_INT;
#ifdef DMAC_ARRAYCHAIN
int c;
#endif
DPRINTF (3, ("dmac_start_xfer\n"));
#ifdef DMAC_DEBUG
@ -543,9 +546,11 @@ dmac_done(arg)
{
struct dmac_channel_stat *chan = arg;
struct dmac_softc *sc = (void*) chan->ch_softc;
#ifdef DMAC_ARRAYCHAIN
struct dmac_dma_xfer *xf = &chan->ch_xfer;
struct x68k_bus_dmamap *map = xf->dx_dmamap;
int c;
#endif
DPRINTF (3, ("dmac_done\n"));
@ -624,7 +629,6 @@ dmac_abort_xfer(self, xf)
{
struct dmac_softc *sc = (void*) self;
struct dmac_channel_stat *chan = xf->dx_channel;
struct x68k_bus_dmamap *dmamap = xf->dx_dmamap;
bus_space_write_1(sc->sc_bst, chan->ch_bht, DMAC_REG_CCR,
DMAC_CCR_INT | DMAC_CCR_HLT);

View File

@ -1,4 +1,4 @@
/* $NetBSD: mha.c,v 1.23 2001/11/04 12:04:14 tsutsui Exp $ */
/* $NetBSD: mha.c,v 1.24 2001/11/25 16:00:06 minoura Exp $ */
/*-
* Copyright (c) 1996-1999 The NetBSD Foundation, Inc.
@ -388,9 +388,7 @@ mhaattach(parent, self, aux)
/* drop off */
while (SSR & SS_IREQUEST)
{
unsigned a = ISCSR;
}
;
CMR = CMD_SET_UP_REG; /* setup reg cmd. */
@ -575,7 +573,6 @@ mhaselect(sc, target, lun, cmd, clen)
u_char *cmd;
u_char clen;
{
struct spc_tinfo *ti = &sc->sc_tinfo[target];
int i;
int s;
@ -1044,7 +1041,6 @@ mha_msgin(sc)
register struct mha_softc *sc;
{
register int v;
int n;
SPC_TRACE(("[mha_msgin(curmsglen:%d)] ", sc->sc_imlen));
@ -1206,10 +1202,8 @@ gotit:
ti->offset = 0;
mha_sched_msgout(SEND_SDTR);
} else {
int r = 250/ti->period;
int s = (100*250)/ti->period - 100*r;
int p;
#if 0
int p;
p = mha_stp2cpb(sc, ti->period);
ti->period = mha_cpb2stp(sc, p);
#endif
@ -1238,10 +1232,6 @@ gotit:
TMR = TM_SYNC;
ti->flags |= T_SYNCMODE;
}
#if SPC_DEBUG
printf("max sync rate %d.%02dMb/s\n",
r, s);
#endif
}
ti->flags &= ~T_NEGOTIATE;
break;
@ -1338,7 +1328,9 @@ void
mha_msgout(sc)
register struct mha_softc *sc;
{
#if (SPC_USE_SYNCHRONOUS || SPC_USE_WIDE)
struct spc_tinfo *ti;
#endif
int n;
SPC_TRACE(("mha_msgout "));
@ -1545,7 +1537,7 @@ mha_datain_pio(sc, p, n)
int a;
int total_n = n;
SPC_TRACE(("[mha_datain_pio(%x,%d)", p, n));
SPC_TRACE(("[mha_datain_pio(%p,%d)", p, n));
WAIT;
sc->sc_ps[3] = 1;
@ -1583,7 +1575,7 @@ mha_dataout_pio(sc, p, n)
int a;
int total_n = n;
SPC_TRACE(("[mha_dataout_pio(%x,%d)", p, n));
SPC_TRACE(("[mha_dataout_pio(%p,%d)", p, n));
WAIT;
sc->sc_ps[3] = 1;
@ -1619,7 +1611,7 @@ mha_dataio_dma(dw, cw, sc, p, n)
u_char *p;
int n;
{
char *paddr, *vaddr;
char *paddr;
if (n > MAXBSIZE)
panic("transfer size exceeds MAXBSIZE");
@ -1668,8 +1660,6 @@ mha_dataout(sc, p, n)
u_char *p;
int n;
{
register struct acb *acb = sc->sc_nexus;
if (n == 0)
return n;
@ -1684,9 +1674,7 @@ mha_datain(sc, p, n)
u_char *p;
int n;
{
int ts;
register struct acb *acb = sc->sc_nexus;
char *paddr, *vaddr;
if (n == 0)
return n;
@ -1713,15 +1701,13 @@ mhaintr(arg)
u_char ints;
#endif
struct acb *acb;
struct scsipi_periph *periph;
struct spc_tinfo *ti;
u_char ph;
u_short r;
int n;
#if 1 /* XXX called during attach? */
if (tmpsc != NULL) {
SPC_MISC(("[%x %x]\n", mha_cd.cd_devs, sc));
SPC_MISC(("[%p %p]\n", mha_cd.cd_devs, sc));
sc = tmpsc;
} else {
#endif
@ -1739,7 +1725,6 @@ mhaintr(arg)
SPC_TRACE(("[mhaintr]"));
loop:
/*
* $BA4E>Aw$,40A4$K=*N;$9$k$^$G%k!<%W$9$k(B
*/
@ -1761,7 +1746,7 @@ mhaintr(arg)
SPC_MISC(("[r=0x%x]", r));
switch (r >> 8) {
default:
printf("[addr=%x\n"
printf("[addr=%p\n"
"result=0x%x\n"
"cmd=0x%x\n"
"ph=0x%x(ought to be %d)]\n",
@ -1992,6 +1977,8 @@ mhaintr(arg)
continue;
}
}
return 1;
}
void
@ -2028,7 +2015,6 @@ mha_timeout(arg)
(void*)periph->periph_channel->chan_adapter->adapt_dev;
scsipi_printaddr(periph);
again:
printf("%s: timed out [acb %p (flags 0x%x, dleft %x, stat %x)], "
"<state %d, nexus %p, phase(c %x, p %x), resid %x, msg(q %x,o %x) >",
sc->sc_dev.dv_xname,
@ -2086,9 +2072,9 @@ mha_print_acb(acb)
struct acb *acb;
{
printf("acb@%x xs=%x flags=%x", acb, acb->xs, acb->flags);
printf(" dp=%x dleft=%d stat=%x\n",
(long)acb->daddr, acb->dleft, acb->stat);
printf("acb@%p xs=%p flags=%x", acb, acb->xs, acb->flags);
printf(" dp=%p dleft=%d stat=%x\n",
acb->daddr, acb->dleft, acb->stat);
mha_show_scsi_cmd(acb);
}
@ -2118,7 +2104,7 @@ mha_dump_driver(sc)
struct spc_tinfo *ti;
int i;
printf("nexus=%x prevphase=%x\n", sc->sc_nexus, sc->sc_prevphase);
printf("nexus=%p prevphase=%x\n", sc->sc_nexus, sc->sc_prevphase);
printf("state=%x msgin=%x msgpriq=%x msgoutq=%x lastmsg=%x currmsg=%x\n",
sc->sc_state, sc->sc_imess[0],
sc->sc_msgpriq, sc->sc_msgoutq, sc->sc_lastmsg, sc->sc_currmsg);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ms.c,v 1.10 2000/03/23 06:47:33 thorpej Exp $ */
/* $NetBSD: ms.c,v 1.11 2001/11/25 16:00:06 minoura Exp $ */
/*
* Copyright (c) 1992, 1993
@ -222,7 +222,6 @@ msopen(dev, flags, mode, p)
{
struct ms_softc *ms;
int unit;
int s;
unit = minor(dev);
if (unit >= ms_cd.cd_ndevs)

View File

@ -1,4 +1,4 @@
/* $NetBSD: vs.c,v 1.10 2001/11/13 09:27:06 isaki Exp $ */
/* $NetBSD: vs.c,v 1.11 2001/11/25 16:00:06 minoura Exp $ */
/*
* Copyright (c) 2001 Tetsuya Isaki. All rights reserved.
@ -297,7 +297,7 @@ vs_dmaerrintr(void *hdl)
DPRINTF(1, ("%s: DMA transfer error.\n", sc->sc_dev.dv_xname));
/* XXX */
vs_dmaintr(hdl);
vs_dmaintr(sc);
return 1;
}