diff options
author | archie <archie@FreeBSD.org> | 1998-12-07 21:58:50 +0000 |
---|---|---|
committer | archie <archie@FreeBSD.org> | 1998-12-07 21:58:50 +0000 |
commit | 60d13c7a9dd18f720483338ebef03609492ca98c (patch) | |
tree | 5709d8cdab99e3c1cb9ae7c2117627c1031fdf39 /sys/i386/isa | |
parent | 2f8d013d96c256b3a48e227aab238e53eb9304cf (diff) | |
download | FreeBSD-src-60d13c7a9dd18f720483338ebef03609492ca98c.zip FreeBSD-src-60d13c7a9dd18f720483338ebef03609492ca98c.tar.gz |
The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
Diffstat (limited to 'sys/i386/isa')
33 files changed, 86 insertions, 154 deletions
diff --git a/sys/i386/isa/alog.c b/sys/i386/isa/alog.c index b01d2dc..65c8e1a 100644 --- a/sys/i386/isa/alog.c +++ b/sys/i386/isa/alog.c @@ -522,7 +522,6 @@ static int sync_clock2 (int unit, long period) static int alog_attach (struct isa_device *idp) { int unit = idp->id_unit; /* this device unit number */ - int iobase = idp->id_iobase; /* the base address of the unit */ talog_unit *info; /* pointer to driver specific info for unit */ int chan; /* the channel used for creating devfs nodes */ diff --git a/sys/i386/isa/atapi-cd.c b/sys/i386/isa/atapi-cd.c index 423b956..86c3127 100644 --- a/sys/i386/isa/atapi-cd.c +++ b/sys/i386/isa/atapi-cd.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atapi-cd.c,v 1.4 1998/10/30 10:57:09 luigi Exp $ + * $Id: atapi-cd.c,v 1.5 1998/11/21 01:57:48 archie Exp $ */ #include "wdc.h" @@ -94,7 +94,6 @@ static void acd_done(struct acd *, struct buf *, int, struct atapires); static int acd_read_toc(struct acd *); static int acd_request_wait(struct acd *, u_char, u_char, u_char, u_char, u_char, u_char, u_char, u_char, u_char, u_char, char *, int); static void acd_describe(struct acd *); -static int acd_open(dev_t, int, int); static int acd_setchan(struct acd *, u_char, u_char, u_char, u_char); static int acd_eject(struct acd *, int); static void acd_select_slot(struct acd *); @@ -443,16 +442,12 @@ acdclose(dev_t dev, int flags, int fmt, struct proc *p) static int acdread(dev_t dev, struct uio *uio, int ioflag) { - struct acd *cdp = acdtab[dkunit(dev)]; - return physio(acdstrategy, NULL, dev, 1, minphys, uio); } static int acdwrite(dev_t dev, struct uio *uio, int ioflag) { - struct acd *cdp = acdtab[dkunit(dev)]; - return physio(acdstrategy, NULL, dev, 0, minphys, uio); } @@ -1289,7 +1284,6 @@ acd_open_track(struct acd *cdp, struct wormio_prepare_track *ptp) { struct write_param param; struct atapires result; - int error; result = atapi_request_wait(cdp->ata, cdp->unit, ATAPI_MODE_SENSE, 0, 0x05, 0, 0, 0, 0, @@ -1575,8 +1569,6 @@ static acd_devsw_installed = 0; static void acd_drvinit(void *unused) { - dev_t dev; - if (!acd_devsw_installed) { cdevsw_add_generic(BDEV_MAJOR, CDEV_MAJOR, &acd_cdevsw); acd_devsw_installed = 1; diff --git a/sys/i386/isa/atapi.c b/sys/i386/isa/atapi.c index 357d8d1..964a3ae 100644 --- a/sys/i386/isa/atapi.c +++ b/sys/i386/isa/atapi.c @@ -170,8 +170,6 @@ static int atapi_io (struct atapi *ata, struct atapicmd *ac); static int atapi_start_cmd (struct atapi *ata, struct atapicmd *ac); static int atapi_wait_cmd (struct atapi *ata, struct atapicmd *ac); -static void atapi_poll_dsc(struct atapi *ata); - extern int wdstart (int ctrlr); extern int acdattach(struct atapi*, int, struct atapi_params*, int); extern int wcdattach(struct atapi*, int, struct atapi_params*, int); diff --git a/sys/i386/isa/fd.c b/sys/i386/isa/fd.c index 3bb7737..37df7b1 100644 --- a/sys/i386/isa/fd.c +++ b/sys/i386/isa/fd.c @@ -43,7 +43,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.124 1998/10/22 05:58:38 bde Exp $ + * $Id: fd.c,v 1.125 1998/12/04 22:54:46 archie Exp $ * */ @@ -1299,7 +1299,6 @@ fdintr(fdcu_t fdcu) static int fdstate(fdcu_t fdcu, fdc_p fdc) { - struct subdev *sd; int read, format, head, i, sec = 0, sectrac, st0, cyl, st3; unsigned blknum = 0, b_cylinder = 0; fdu_t fdu = fdc->fdu; @@ -1743,10 +1742,8 @@ static int retrier(fdcu) fdcu_t fdcu; { - struct subdev *sd; fdc_p fdc = fdc_data + fdcu; register struct buf *bp; - int fdu; bp = bufq_first(&fdc->head); diff --git a/sys/i386/isa/if_cs.c b/sys/i386/isa/if_cs.c index 3b63f4d..1eaf3de 100644 --- a/sys/i386/isa/if_cs.c +++ b/sys/i386/isa/if_cs.c @@ -27,7 +27,7 @@ */ /* - * $Id: if_cs.c,v 1.5 1998/10/04 02:11:15 msmith Exp $ + * $Id: if_cs.c,v 1.6 1998/10/22 05:58:38 bde Exp $ * * Device driver for Crystal Semiconductor CS8920 based ethernet * adapters. By Maxim Bolotin and Oleg Sharoiko, 27-April-1997 @@ -190,7 +190,6 @@ get_eeprom_cksum(int off, int len, int *buffer) static int wait_eeprom_ready(struct cs_softc *sc) { - int timeout=1000; DELAY ( 30000 ); /* XXX should we do some checks here ? */ return 0; } @@ -233,7 +232,6 @@ cs_duplex_auto(struct cs_softc *sc) static int enable_tp(struct cs_softc *sc) { - int i; int unit = sc->arpcom.ac_if.if_unit; cs_writereg(sc->nic_addr, PP_LineCTL, sc->line_ctl & ~AUI_ONLY); @@ -254,7 +252,6 @@ enable_tp(struct cs_softc *sc) static int send_test_pkt(struct cs_softc *sc) { - int unit = sc->arpcom.ac_if.if_unit; char test_packet[] = { 0,0,0,0,0,0, 0,0,0,0,0,0, 0, 46, /* A 46 in network order */ 0, 0, /* DSAP=0 & SSAP=0 fields */ @@ -343,7 +340,7 @@ cs_cs89x0_probe(struct cs_softc *sc, u_int *dev_irq, int *dev_drq, int iobase, int unit, int flags) { unsigned rev_type = 0; - int i, irq=0, result; + int i, irq=0; int eeprom_buff[CHKSUM_LEN]; int chip_type, pp_isaint, pp_isadma; char chip_revision; @@ -646,7 +643,7 @@ cs_init(void *xsc) { struct cs_softc *sc=(struct cs_softc *)xsc; struct ifnet *ifp = &sc->arpcom.ac_if; - int i, s, result, rx_cfg; + int i, s, rx_cfg; /* address not known */ if (TAILQ_EMPTY(&ifp->if_addrhead)) /* unlikely? XXX */ @@ -816,7 +813,7 @@ static void csintr_sc(struct cs_softc *sc, int unit) { struct ifnet *ifp = &(sc->arpcom.ac_if); - int status, s; + int status; #ifdef CS_DEBUG printf(CS_NAME"%1d: Interrupt.\n", unit); @@ -1306,7 +1303,6 @@ csintr_pnp_add(struct cs_softc *sc, int unit) static void csintr_pnp(int unit) { - struct cs_softc *sc; struct csintr_list *intr; for (intr=csintr_head; intr; intr=intr->next) { diff --git a/sys/i386/isa/if_el.c b/sys/i386/isa/if_el.c index a7520d7..dac89ff 100644 --- a/sys/i386/isa/if_el.c +++ b/sys/i386/isa/if_el.c @@ -6,7 +6,7 @@ * * Questions, comments, bug reports and fixes to kimmel@cs.umass.edu. * - * $Id: if_el.c,v 1.37 1998/06/21 15:54:11 bde Exp $ + * $Id: if_el.c,v 1.38 1998/10/22 05:58:39 bde Exp $ */ /* Except of course for the portions of code lifted from other FreeBSD * drivers (mainly elread, elget and el_ioctl) @@ -155,8 +155,6 @@ el_attach(struct isa_device *idev) { struct el_softc *sc; struct ifnet *ifp; - struct ifaddr *ifa; - struct sockaddr_dl *sdl; u_short base; dprintf(("Attaching el%d...\n",idev->id_unit)); diff --git a/sys/i386/isa/if_fe.c b/sys/i386/isa/if_fe.c index ae8613a..929d0f7 100644 --- a/sys/i386/isa/if_fe.c +++ b/sys/i386/isa/if_fe.c @@ -21,7 +21,7 @@ */ /* - * $Id: if_fe.c,v 1.42 1998/06/21 16:51:06 bde Exp $ + * $Id: if_fe.c,v 1.43 1998/10/22 05:58:39 bde Exp $ * * Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards. * To be used with FreeBSD 2.x @@ -395,7 +395,6 @@ feinit(struct pccard_devinfo *devi) static void feunload(struct pccard_devinfo *devi) { - struct fe_softc *sc = &fe_softc[devi->isahd.id_unit]; printf("fe%d: unload\n", devi->isahd.id_unit); fe_stop(devi->isahd.id_unit); } @@ -1209,7 +1208,7 @@ fe_probe_gwy ( DEVICE * dev, struct fe_softc * sc ) static int fe_probe_mbh ( DEVICE * dev, struct fe_softc * sc ) { - int i,type; + int i; static struct fe_simple_probe_struct probe_table [] = { { FE_DLCR0, 0x09, 0x00 }, diff --git a/sys/i386/isa/if_wl.c b/sys/i386/isa/if_wl.c index 73fc3ac..6cf40b1 100644 --- a/sys/i386/isa/if_wl.c +++ b/sys/i386/isa/if_wl.c @@ -1,4 +1,4 @@ -/* $Id: if_wl.c,v 1.16 1998/10/22 05:58:39 bde Exp $ */ +/* $Id: if_wl.c,v 1.17 1998/11/15 19:30:48 eivind Exp $ */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -311,7 +311,6 @@ static void wlmmcstat(int unit); static u_short wlbldru(int unit); static u_short wlmmcread(u_int base, u_short reg); static void wlinitmmc(int unit); -static void wlsetirq(int base, int irq); static int wlhwrst(int unit); static void wlrustrt(int unit); static void wlbldcu(int unit); @@ -365,7 +364,6 @@ wlprobe(struct isa_device *id) { struct wl_softc *sc = &wl_softc[id->id_unit]; register short base = id->id_iobase; - int unit = id->id_unit; char *str = "wl%d: board out of range [0..%d]\n"; u_char inbuf[100]; unsigned long oldpri; @@ -723,8 +721,6 @@ static int wlhwrst(int unit) { register struct wl_softc *sc = WLSOFTC(unit); - int i; - short base = sc->base; #ifdef WLDEBUG if (sc->wl_if.if_flags & IFF_DEBUG) @@ -1171,7 +1167,6 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data) short base = sc->base; short mode = 0; int opri, error = 0; - u_short tmp; struct proc *p = curproc; /* XXX */ int irq, irqval, i, isroot, size; caddr_t up; @@ -1479,11 +1474,8 @@ wlintr(unit) int unit; { register struct wl_softc *sc = &wl_softc[unit]; - scb_t scb; - ac_t cb; short base = sc->base; - int next, x, opri; - int i, ac_status; + int ac_status; u_short int_type, int_type1; #ifdef WLDEBUG @@ -2328,7 +2320,6 @@ static void wlsftwsleaze(u_short *countp, u_char **mb_pp, struct mbuf **tm_pp, int unit) { struct mbuf *tm_p = *tm_pp; - u_char *mb_p = *mb_pp; u_short count = 0; u_char *cp = (u_char *) t_packet; int len; @@ -2387,10 +2378,6 @@ wlmmcread(u_int base, u_short reg) static void getsnr(int unit) { - register struct wl_softc *sc = WLSOFTC(unit); - short base = sc->base; - register int s; - MMC_WRITE(MMC_FREEZE,1); /* * SNR retrieval procedure : diff --git a/sys/i386/isa/if_ze.c b/sys/i386/isa/if_ze.c index 4900804..3000e89 100644 --- a/sys/i386/isa/if_ze.c +++ b/sys/i386/isa/if_ze.c @@ -47,7 +47,7 @@ */ /* - * $Id: if_ze.c,v 1.54 1998/06/21 17:08:08 bde Exp $ + * $Id: if_ze.c,v 1.55 1998/10/22 05:58:39 bde Exp $ */ /* XXX don't mix different PCCARD support code. */ @@ -726,7 +726,9 @@ ze_watchdog(ifp) #if 1 struct ze_softc *sc = (struct ze_softc *)ifp; u_char isr, imr; +#ifndef SMP u_int imask; +#endif if(!(ifp->if_flags & IFF_UP)) return; diff --git a/sys/i386/isa/ipl_funcs.c b/sys/i386/isa/ipl_funcs.c index cd4628c..38b1945 100644 --- a/sys/i386/isa/ipl_funcs.c +++ b/sys/i386/isa/ipl_funcs.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ipl_funcs.c,v 1.12 1998/01/15 07:34:01 gibbs Exp $ + * $Id: ipl_funcs.c,v 1.13 1998/02/01 22:04:58 bde Exp $ */ #include <sys/types.h> @@ -379,9 +379,10 @@ splx(unsigned ipl) intrmask_t splq(intrmask_t mask) { - intrmask_t tmp, tmp2; - + intrmask_t tmp; #ifdef INTR_SPL + intrmask_t tmp2; + for (;;) { IFCPL_LOCK(); tmp = tmp2 = cpl; diff --git a/sys/i386/isa/loran.c b/sys/i386/isa/loran.c index 20385bd..4a3f187 100644 --- a/sys/i386/isa/loran.c +++ b/sys/i386/isa/loran.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: loran.c,v 1.11 1998/10/24 19:55:09 phk Exp $ + * $Id: loran.c,v 1.12 1998/12/04 22:54:46 archie Exp $ * * This device-driver helps the userland controlprogram for a LORAN-C * receiver avoid monopolizing the CPU. @@ -204,8 +204,6 @@ static u_int64_t ticker; static u_char par; -static struct datapoint *this, *next; - static MALLOC_DEFINE(M_LORAN, "Loran", "Loran datapoints"); static int loranerror; @@ -317,8 +315,6 @@ loranattach(struct isa_device *isdp) static int loranopen (dev_t dev, int flags, int fmt, struct proc *p) { - u_long ef; - struct datapoint *this; int idx; idx = minor(dev); @@ -595,7 +591,6 @@ loran_get_timecount(struct timecounter *tc) { unsigned count; u_long ef; - u_int high, low; ef = read_eflags(); disable_intr(); diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index 2ec330a..bb2b879 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 - * $Id: npx.c,v 1.61 1998/06/21 18:02:39 bde Exp $ + * $Id: npx.c,v 1.62 1998/10/22 05:58:40 bde Exp $ */ #include "npx.h" @@ -146,15 +146,17 @@ SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, &hw_float, 0, "Floatingpoint instructions executed in hardware"); -static u_int npx0_imask = SWI_CLOCK_MASK; +#ifndef SMP +static u_int npx0_imask = SWI_CLOCK_MASK; +static struct gate_descriptor npx_idt_probeintr; +static volatile u_int npx_intrs_while_probing; +static volatile u_int npx_traps_while_probing; +#endif static bool_t npx_ex16; static bool_t npx_exists; -static struct gate_descriptor npx_idt_probeintr; static int npx_intrno; -static volatile u_int npx_intrs_while_probing; static bool_t npx_irq13; -static volatile u_int npx_traps_while_probing; #ifndef SMP /* @@ -249,8 +251,10 @@ static int npxprobe1(dvp) struct isa_device *dvp; { +#ifndef SMP u_short control; u_short status; +#endif /* * Partially reset the coprocessor, if any. Some BIOS's don't reset diff --git a/sys/i386/isa/pcf.c b/sys/i386/isa/pcf.c index 7363077..b3e11d8 100644 --- a/sys/i386/isa/pcf.c +++ b/sys/i386/isa/pcf.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pcf.c,v 1.4 1998/10/31 14:23:09 peter Exp $ + * $Id: pcf.c,v 1.5 1998/11/04 22:09:17 nsouch Exp $ * */ #include <sys/param.h> @@ -149,7 +149,6 @@ pcfprobe_isa(struct isa_device *dvp) { device_t pcfdev; struct pcf_isa_softc *pcf; - int error; if (npcf >= MAXPCF) return (0); @@ -172,7 +171,6 @@ pcfprobe_isa(struct isa_device *dvp) if (!pcfdev) goto error; -end_probe: return (1); error: diff --git a/sys/i386/isa/pcvt/pcvt_kbd.c b/sys/i386/isa/pcvt/pcvt_kbd.c index 579c1a2..2113ee0 100644 --- a/sys/i386/isa/pcvt/pcvt_kbd.c +++ b/sys/i386/isa/pcvt/pcvt_kbd.c @@ -239,7 +239,7 @@ update_led(void) /* Don't update LED's unless necessary. */ - int opri, new_ledstate, response1, response2; + int opri, new_ledstate; opri = spltty(); new_ledstate = (vsp->scroll_lock) | @@ -249,6 +249,7 @@ update_led(void) if (new_ledstate != ledstate) { #ifndef _I386_ISA_KBDIO_H_ + int response1, response2; ledstate = LEDSTATE_UPDATE_PENDING; @@ -412,7 +413,9 @@ static int set_keyboard_param(int command, int data) { int s; +#if 0 int c; +#endif if (kbdc == NULL) return 1; diff --git a/sys/i386/isa/ppc.c b/sys/i386/isa/ppc.c index a22dfb0..f24654b 100644 --- a/sys/i386/isa/ppc.c +++ b/sys/i386/isa/ppc.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ppc.c,v 1.10 1998/10/22 05:58:40 bde Exp $ + * $Id: ppc.c,v 1.11 1998/10/31 11:37:09 nsouch Exp $ * */ #include "ppc.h" @@ -240,7 +240,7 @@ static int ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never forced */ { static int index = 0; - int base, idport, irq; + int idport, irq; int ptr, pcr, val, i; while ((idport = pc873xx_basetab[index++])) { @@ -701,7 +701,7 @@ static int w83877f_hefs[] = { WINB_HEFERE, WINB_HEFRAS, WINB_HEFERE | WINB_HEFRA static int ppc_w83877f_detect(struct ppc_data *ppc, int chipset_mode) { - int i, j, efer, base; + int i, j, efer; unsigned char r, hefere, hefras; for (i = 0; i < 4; i ++) { @@ -876,8 +876,6 @@ found: static int ppc_generic_detect(struct ppc_data *ppc, int chipset_mode) { - char save_control; - /* default to generic */ ppc->ppc_link.adapter = &ppc_generic_adapter; @@ -1308,7 +1306,6 @@ ppcprobe(struct isa_device *dvp) { static short next_bios_ppc = 0; struct ppc_data *ppc; - int error; /* * If port not specified, use bios list. @@ -1370,8 +1367,6 @@ ppcprobe(struct isa_device *dvp) if (ppc_detect(ppc, dvp->id_flags & 0xf)) goto error; -end_probe: - return (1); error: @@ -1383,7 +1378,6 @@ ppcattach(struct isa_device *isdp) { struct ppc_data *ppc = ppcdata[isdp->id_unit]; struct ppb_data *ppbus; - char * mode; printf("ppc%d: %s chipset (%s) in %s mode%s\n", ppc->ppc_unit, ppc_types[ppc->ppc_type], ppc_avms[ppc->ppc_avm], diff --git a/sys/i386/isa/rp.c b/sys/i386/isa/rp.c index 847660e..7dd8c6d 100644 --- a/sys/i386/isa/rp.c +++ b/sys/i386/isa/rp.c @@ -809,10 +809,11 @@ static struct cdevsw rp_cdevsw = { static int rp_controller_port = 0; static int rp_num_ports_open = 0; -static int rp_timeout; static int ndevs = 0; static int minor_to_unit[128]; +#if 0 static struct tty rp_tty[128]; +#endif static int rp_num_ports[4]; /* Number of ports on each controller */ @@ -858,7 +859,7 @@ static _INLINE_ void rp_do_receive(struct rp_port *rp, struct tty *tp, { int spl; unsigned int CharNStat; - int ToRecv, wRecv, ch; + int ToRecv, ch; ToRecv = sGetRxCnt(cp); if(ToRecv == 0) @@ -924,7 +925,7 @@ static _INLINE_ void rp_handle_port(struct rp_port *rp) CHANNEL_t *cp; struct tty *tp; unsigned int IntMask, ChanStatus; - int oldcts, ToRecv; + /* int oldcts; */ if(!rp) return; @@ -1023,9 +1024,8 @@ int rpprobe(dev) struct isa_device *dev; { - struct isa_device *idev; int controller, unit; - int i, aiop, num_aiops; + int aiop, num_aiops; unsigned int aiopio[MAX_AIOPS_PER_BOARD]; CONTROLLER_t *ctlp; @@ -1070,7 +1070,7 @@ static void rp_pciattach(pcici_t tag, int unit) { dev_t rp_dev; - int success, rpmajor, oldspl; + int success, oldspl; u_short iobase; int num_ports, num_chan, num_aiops; int aiop, chan, port; @@ -1079,7 +1079,6 @@ rp_pciattach(pcici_t tag, int unit) struct rp_port *rp; struct tty *tty; CONTROLLER_t *ctlp; - char status; success = pci_map_port(tag, 0x10, &iobase); if(!success) @@ -1183,7 +1182,7 @@ struct isa_device *dev; { struct isa_device *idev; dev_t rp_dev; - int iobase, unit, rpmajor, oldspl; + int iobase, unit, /*rpmajor,*/ oldspl; int num_ports, num_chan, num_aiops; int aiop, chan, port; int ChanStatus, line, i, count; @@ -1191,7 +1190,6 @@ struct isa_device *dev; struct rp_port *rp; struct tty *tty; CONTROLLER_t *ctlp; - char status; iobase = dev->id_iobase; unit = dev->id_unit; @@ -1303,7 +1301,7 @@ rpopen(dev, flag, mode, p) struct proc *p; { struct rp_port *rp; - int unit, i, port, mynor, umynor, flags; /* SG */ + int unit, port, mynor, umynor, flags; /* SG */ struct tty *tp; int oldspl, error; unsigned int IntMask, ChanStatus; @@ -1450,7 +1448,7 @@ rpclose(dev, flag, mode, p) int flag, mode; struct proc *p; { - int oldspl, unit, mynor, umynor, port, status, i; /* SG */ + int oldspl, unit, mynor, umynor, port; /* SG */ struct rp_port *rp; struct tty *tp; CHANNEL_t *cp; @@ -1483,7 +1481,7 @@ rpclose(dev, flag, mode, p) static void rphardclose(struct rp_port *rp) { - int status, oldspl, mynor; + int mynor; struct tty *tp; CHANNEL_t *cp; @@ -1525,7 +1523,7 @@ rpread(dev, uio, flag) { struct rp_port *rp; struct tty *tp; - int unit, i, mynor, umynor, port, error = 0; /* SG */ + int unit, mynor, umynor, port, error = 0; /* SG */ umynor = (((minor(dev) >> 16) -1) * 32); /* SG */ port = (minor(dev) & 0x1f); /* SG */ @@ -1549,7 +1547,7 @@ rpwrite(dev, uio, flag) { struct rp_port *rp; struct tty *tp; - int unit, i, mynor, port, umynor, error = 0; /* SG */ + int unit, mynor, port, umynor, error = 0; /* SG */ umynor = (((minor(dev) >> 16) -1) * 32); /* SG */ port = (minor(dev) & 0x1f); /* SG */ @@ -1594,9 +1592,8 @@ rpioctl(dev, cmd, data, flag, p) CHANNEL_t *cp; struct tty *tp; int unit, mynor, port, umynor; /* SG */ - int oldspl, cflag, iflag, oflag, lflag; - int i, error = 0; - char status; + int oldspl; + int error = 0; int arg, flags, result, ChanStatus; int oldcmd; struct termios term, *t; @@ -1804,9 +1801,9 @@ rpparam(tp, t) { struct rp_port *rp; CHANNEL_t *cp; - int unit, i, mynor, port, umynor; /* SG */ + int unit, mynor, port, umynor; /* SG */ int oldspl, cflag, iflag, oflag, lflag; - int ospeed, flags; + int ospeed; umynor = (((minor(tp->t_dev) >> 16) -1) * 32); /* SG */ @@ -1942,10 +1939,10 @@ rpstart(tp) struct rp_port *rp; CHANNEL_t *cp; struct clist *qp; - int unit, i, mynor, port, umynor; /* SG */ - char status, ch, flags; + int unit, mynor, port, umynor; /* SG */ + char ch, flags; int spl, xmit_fifo_room; - int count, ToRecv; + int count; umynor = (((minor(tp->t_dev) >> 16) -1) * 32); /* SG */ @@ -2002,11 +1999,8 @@ rpstop(tp, flag) { struct rp_port *rp; CHANNEL_t *cp; - struct clist *qp; int unit, mynor, port, umynor; /* SG */ - char status, ch; - int spl, xmit_fifo_room; - int i, count; + int spl; umynor = (((minor(tp->t_dev) >> 16) -1) * 32); /* SG */ port = (minor(tp->t_dev) & 0x1f); /* SG */ @@ -2044,7 +2038,7 @@ struct tty * rpdevtotty(dev_t dev) { struct rp_port *rp; - int unit, i, port, mynor, umynor; /* SG */ + int unit, port, mynor, umynor; /* SG */ umynor = (((minor(dev) >> 16) -1) * 32); /* SG */ port = (minor(dev) & 0x1f); /* SG */ diff --git a/sys/i386/isa/scvesactl.c b/sys/i386/isa/scvesactl.c index aabfe19..39ac7ea 100644 --- a/sys/i386/isa/scvesactl.c +++ b/sys/i386/isa/scvesactl.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: scvesactl.c,v 1.5 1998/09/26 03:38:40 yokota Exp $ + * $Id: scvesactl.c,v 1.6 1998/10/01 11:39:17 yokota Exp $ */ #include "sc.h" @@ -52,11 +52,8 @@ vesa_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) { scr_stat *scp; struct tty *tp; - video_info_t info; video_adapter_t *adp; int mode; - int error; - int s; tp = scdevtotty(dev); if (!tp) @@ -84,7 +81,6 @@ vesa_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) if (!(adp->va_flags & V_ADP_MODECHANGE)) return ENODEV; mode = (cmd & 0xff) + M_VESA_BASE; -vesa_text: return sc_set_text_mode(scp, tp, mode, 0, 0, 0); /* graphics modes */ @@ -112,7 +108,6 @@ vesa_text: if (!(adp->va_flags & V_ADP_MODECHANGE)) return ENODEV; mode = (cmd & 0xff) + M_VESA_BASE; -vesa_graphics: return sc_set_graphics_mode(scp, tp, mode); } diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c index 729f585..0d7f0a5 100644 --- a/sys/i386/isa/sio.c +++ b/sys/i386/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.217 1998/11/22 09:41:12 bde Exp $ + * $Id: sio.c,v 1.218 1998/11/22 10:47:42 bde Exp $ */ #include "opt_comconsole.h" @@ -1521,7 +1521,6 @@ siointr1(com) u_char modem_status; u_char *ioptr; u_char recv_data; - u_char int_ident; u_char int_ctl; u_char int_ctl_new; diff --git a/sys/i386/isa/sound/ad1848.c b/sys/i386/isa/sound/ad1848.c index 08b0a1e..243ed78 100644 --- a/sys/i386/isa/sound/ad1848.c +++ b/sys/i386/isa/sound/ad1848.c @@ -914,7 +914,6 @@ ad1848_start_input(int dev, u_long buf, int count, static int ad1848_prepare_for_IO(int dev, int bsize, int bcount) { - int timeout; u_char fs, old_fs; u_long flags; ad1848_info *devc = (ad1848_info *) audio_devs[dev]->devc; diff --git a/sys/i386/isa/sound/dmabuf.c b/sys/i386/isa/sound/dmabuf.c index 613e30b..76494ad 100644 --- a/sys/i386/isa/sound/dmabuf.c +++ b/sys/i386/isa/sound/dmabuf.c @@ -331,7 +331,6 @@ static int dma_sync(int dev) { u_long flags; - int i = 0; if (!audio_devs[dev]->go && (!audio_devs[dev]->enable_bits & PCM_ENABLE_OUTPUT)) return 0; @@ -1155,8 +1154,6 @@ DMAbuf_outputintr(int dev, int event_type) if (dmap->mapping_flags & DMA_MAP_MAPPED) { /* mmapped access */ - int p = dmap->fragment_size * dmap->qhead; - dmap->qhead = (dmap->qhead + 1) % dmap->nbufs; dmap->qlen++; /* Yes increment it (don't decrement) */ dmap->flags &= ~DMA_ACTIVE; diff --git a/sys/i386/isa/sound/patmgr.c b/sys/i386/isa/sound/patmgr.c index 60f0ed6..752b2e9 100644 --- a/sys/i386/isa/sound/patmgr.c +++ b/sys/i386/isa/sound/patmgr.c @@ -181,7 +181,7 @@ pmgr_access(int dev, struct patmgr_info * rec) if (mbox[dev]) printf(" PATMGR: Server %d mbox full. Why?\n", dev); else { - int flag, chn; + int chn; rec->key = PM_K_COMMAND; mbox[dev] = rec; @@ -235,7 +235,7 @@ pmgr_inform(int dev, int event, u_long p1, u_long p2, u_long p3, u_long p4) if (mbox[dev]) printf(" PATMGR: Server %d mbox full. Why?\n", dev); else { - int flag, chn; + int chn; mbox[dev] = tmp_mbox; mbox[dev]->key = PM_K_EVENT; diff --git a/sys/i386/isa/sound/sb16_dsp.c b/sys/i386/isa/sound/sb16_dsp.c index f94675b..e923176 100644 --- a/sys/i386/isa/sound/sb16_dsp.c +++ b/sys/i386/isa/sound/sb16_dsp.c @@ -197,8 +197,6 @@ sb16_dsp_ioctl(int dev, u_int cmd, ioctl_arg arg, int local) static int sb16_dsp_open(int dev, int mode) { - int retval; - DEB(printf("sb16_dsp_open()\n")); if (!sb16_dsp_ok) { diff --git a/sys/i386/isa/sound/sb_dsp.c b/sys/i386/isa/sound/sb_dsp.c index 7d48ec8..2facd33 100644 --- a/sys/i386/isa/sound/sb_dsp.c +++ b/sys/i386/isa/sound/sb_dsp.c @@ -539,8 +539,6 @@ sb_dsp_halt_xfer(int dev) static int sb_dsp_open(int dev, int mode) { - int retval; - if (!sb_dsp_ok) { printf("SB Error: SoundBlaster board not installed\n"); return -(ENXIO); diff --git a/sys/i386/isa/sound/sequencer.c b/sys/i386/isa/sound/sequencer.c index 3639cf6..4990774 100644 --- a/sys/i386/isa/sound/sequencer.c +++ b/sys/i386/isa/sound/sequencer.c @@ -157,7 +157,7 @@ sequencer_read(int dev, struct fileinfo * file, snd_rw_buf * buf, int count) flags = splhigh(); if (!iqlen) { - int flag, chn; + int chn; midi_sleeper = &chn; diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c index 4272b15..e490541 100644 --- a/sys/i386/isa/sound/soundcard.c +++ b/sys/i386/isa/sound/soundcard.c @@ -147,7 +147,6 @@ get_time(void) static int sndmmap( dev_t dev, int offset, int nprot ) { - int unit; struct dma_buffparms * dmap; dev = minor(dev) >> 4; diff --git a/sys/i386/isa/sound/sscape.c b/sys/i386/isa/sound/sscape.c index bfd5abe..28ef044 100644 --- a/sys/i386/isa/sound/sscape.c +++ b/sys/i386/isa/sound/sscape.c @@ -292,7 +292,6 @@ void sscapeintr(int irq) { u_char bits, tmp; - static int debug = 0; DEB(printf("sscapeintr(0x%02x)\n", (bits = sscape_read(devc, GA_INTSTAT_REG)))); if ((sscape_sleep_flag.mode & WK_SLEEP)) { @@ -304,6 +303,8 @@ sscapeintr(int irq) } #if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI) if (bits & 0x01) { + static int debug = 0; + mpuintr(irq); if (debug++ > 10) { /* Temporary debugging hack */ sscape_write(devc, GA_INTENA_REG, 0x00); /* Disable all interr. */ @@ -454,7 +455,6 @@ sscape_download_boot(struct sscape_info * devc, u_char *block, int size, int fla done = 0; timeout_val = 100; while (!done && timeout_val-- > 0) { - int resid; int chn; sscape_sleeper = &chn; DO_SLEEP(chn, sscape_sleep_flag, 1); @@ -733,6 +733,8 @@ sscape_audio_reset(int dev) sscape_audio_halt(dev); } + +#if !defined(EXCLUDE_NATIVE_PCM) && defined(CONFIG_AUDIO) static struct audio_operations sscape_audio_operations = { "Not functional", @@ -751,14 +753,13 @@ static struct audio_operations sscape_audio_operations = NULL, NULL }; +#endif /* !defined(EXCLUDE_NATIVE_PCM) && defined(CONFIG_AUDIO) */ static int sscape_detected = 0; void attach_sscape(struct address_info * hw_config) { - int my_dev; - #ifndef SSCAPE_REGS /* * Config register values for Spea/V7 Media FX and Ensoniq S-2000. @@ -877,6 +878,8 @@ attach_sscape(struct address_info * hw_config) #ifdef CONFIG_AUDIO if (num_audiodevs < MAX_AUDIO_DEV) { + int my_dev; + audio_devs[my_dev = num_audiodevs++] = &sscape_audio_operations; audio_devs[my_dev]->dmachan1 = hw_config->dma; audio_devs[my_dev]->buffsize = DSP_BUFFSIZE; diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c index a9c6fc9..f26d3b3 100644 --- a/sys/i386/isa/syscons.c +++ b/sys/i386/isa/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.286 1998/11/03 02:37:46 yokota Exp $ + * $Id: syscons.c,v 1.287 1998/11/08 12:39:02 dfr Exp $ */ #include "sc.h" @@ -640,7 +640,9 @@ static int scattach(struct isa_device *dev) { scr_stat *scp; +#if defined(VESA) && defined(VM86) video_info_t info; +#endif dev_t cdev = makedev(CDEV_MAJOR, 0); #ifdef DEVFS int vc; @@ -924,7 +926,6 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) int i; struct tty *tp; scr_stat *scp; - video_adapter_t *adp; int s; tp = scdevtotty(dev); diff --git a/sys/i386/isa/tw.c b/sys/i386/isa/tw.c index 07d4023..ce98e65 100644 --- a/sys/i386/isa/tw.c +++ b/sys/i386/isa/tw.c @@ -416,7 +416,6 @@ int twopen(dev, flag, mode, p) { struct tw_sc *sc = &tw_sc[TWUNIT(dev)]; int s; - int port; s = spltty(); if(sc->sc_state == 0) { @@ -437,7 +436,6 @@ int twclose(dev, flag, mode, p) { struct tw_sc *sc = &tw_sc[TWUNIT(dev)]; int s; - int port = sc->sc_port; s = spltty(); sc->sc_state = 0; diff --git a/sys/i386/isa/vesa.c b/sys/i386/isa/vesa.c index cfd1075..29f2e3d 100644 --- a/sys/i386/isa/vesa.c +++ b/sys/i386/isa/vesa.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: vesa.c,v 1.7 1998/10/01 11:39:18 yokota Exp $ + * $Id: vesa.c,v 1.8 1998/10/02 03:42:19 yokota Exp $ */ #include "sc.h" @@ -349,7 +349,6 @@ vesa_bios_init(void) static u_char buf[512]; struct vm86frame vmf; struct vesa_mode vmode; - u_int32_t p; int modes; int err; int i; @@ -758,7 +757,6 @@ static int vesa_diag(int level) { struct vesa_mode vmode; - u_int32_t p; int i; #ifndef VESA_MODULE @@ -843,7 +841,9 @@ vesa_load(void) { int adapters; int error; +#ifdef VESA_MODULE int s; +#endif int i; if (vesa_init_done) diff --git a/sys/i386/isa/videoio.c b/sys/i386/isa/videoio.c index 5710080..e239137 100644 --- a/sys/i386/isa/videoio.c +++ b/sys/i386/isa/videoio.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: videoio.c,v 1.5 1998/09/26 03:38:40 yokota Exp $ + * $Id: videoio.c,v 1.6 1998/10/01 11:39:18 yokota Exp $ */ #include "sc.h" @@ -1156,10 +1156,12 @@ static int vid_save_font(int ad, int page, int fontsize, u_char *data, int ch, int count) { u_char buf[PARAM_BUFSIZE]; - u_char val = 0; u_int32_t segment; int c; +#ifdef SC_ALT_SEQACCESS + u_char val = 0; int s; +#endif prologue(ad, V_ADP_FONT, 1); @@ -1231,10 +1233,12 @@ static int vid_load_font(int ad, int page, int fontsize, u_char *data, int ch, int count) { u_char buf[PARAM_BUFSIZE]; - u_char val = 0; u_int32_t segment; int c; +#ifdef SC_ALT_SEQACCESS + u_char val = 0; int s; +#endif prologue(ad, V_ADP_FONT, 1); diff --git a/sys/i386/isa/wd_cd.c b/sys/i386/isa/wd_cd.c index 423b956..86c3127 100644 --- a/sys/i386/isa/wd_cd.c +++ b/sys/i386/isa/wd_cd.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atapi-cd.c,v 1.4 1998/10/30 10:57:09 luigi Exp $ + * $Id: atapi-cd.c,v 1.5 1998/11/21 01:57:48 archie Exp $ */ #include "wdc.h" @@ -94,7 +94,6 @@ static void acd_done(struct acd *, struct buf *, int, struct atapires); static int acd_read_toc(struct acd *); static int acd_request_wait(struct acd *, u_char, u_char, u_char, u_char, u_char, u_char, u_char, u_char, u_char, u_char, char *, int); static void acd_describe(struct acd *); -static int acd_open(dev_t, int, int); static int acd_setchan(struct acd *, u_char, u_char, u_char, u_char); static int acd_eject(struct acd *, int); static void acd_select_slot(struct acd *); @@ -443,16 +442,12 @@ acdclose(dev_t dev, int flags, int fmt, struct proc *p) static int acdread(dev_t dev, struct uio *uio, int ioflag) { - struct acd *cdp = acdtab[dkunit(dev)]; - return physio(acdstrategy, NULL, dev, 1, minphys, uio); } static int acdwrite(dev_t dev, struct uio *uio, int ioflag) { - struct acd *cdp = acdtab[dkunit(dev)]; - return physio(acdstrategy, NULL, dev, 0, minphys, uio); } @@ -1289,7 +1284,6 @@ acd_open_track(struct acd *cdp, struct wormio_prepare_track *ptp) { struct write_param param; struct atapires result; - int error; result = atapi_request_wait(cdp->ata, cdp->unit, ATAPI_MODE_SENSE, 0, 0x05, 0, 0, 0, 0, @@ -1575,8 +1569,6 @@ static acd_devsw_installed = 0; static void acd_drvinit(void *unused) { - dev_t dev; - if (!acd_devsw_installed) { cdevsw_add_generic(BDEV_MAJOR, CDEV_MAJOR, &acd_cdevsw); acd_devsw_installed = 1; diff --git a/sys/i386/isa/wfd.c b/sys/i386/isa/wfd.c index 67d570a..60ceb0b 100644 --- a/sys/i386/isa/wfd.c +++ b/sys/i386/isa/wfd.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: wfd.c,v 1.15 1998/08/23 20:16:34 phk Exp $ + * $Id: wfd.c,v 1.16 1998/09/15 08:15:30 gibbs Exp $ */ /* @@ -661,9 +661,6 @@ int wfdioctl (dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) struct wfd *t = wfdtab[lun]; int error = 0; - struct disklabel *dl; - char buffer[DEV_BSIZE]; - error = dsioctl("wfd", dev, cmd, addr, flag, &t->dk_slices, wfdstrategy1, (ds_setgeom_t *)NULL); if (error != -1) diff --git a/sys/i386/isa/wst.c b/sys/i386/isa/wst.c index ff5f543..4f159b5 100644 --- a/sys/i386/isa/wst.c +++ b/sys/i386/isa/wst.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: wst.c,v 1.12 1998/09/15 18:16:38 sos Exp $ */ #include "wdc.h" @@ -199,7 +199,6 @@ static int wstattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug); static int wst_sense(struct wst *t); static void wst_describe(struct wst *t); -static int wst_open(dev_t dev, int chardev); static void wst_poll_dsc(struct wst *t); static void wst_start(struct wst *t); static void wst_done(struct wst *t, struct buf *bp, int resid, struct atapires result); @@ -230,9 +229,7 @@ int wstattach(struct atapi *ata, int unit, struct atapi_params *ap, int debug) { struct wst *t; - struct atapires result; - int lun, i; - char buffer[255]; + int lun; if (wstnlun >= NUNIT) { printf("wst: too many units\n"); @@ -348,9 +345,7 @@ int wstopen(dev_t dev, int flags, int fmt, struct proc *p) { int lun = UNIT(dev); - char buffer[255]; struct wst *t; - struct atapires result; /* Check that the device number and that the ATAPI driver is loaded. */ if (lun >= wstnlun || !atapi_request_immediate) { |