aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ed/if_ed.c5
-rw-r--r--sys/dev/ep/if_ep.c6
-rw-r--r--sys/dev/fdc/fdc.c5
-rw-r--r--sys/dev/lnc/if_lnc.c7
-rw-r--r--sys/dev/mcd/mcd.c17
-rw-r--r--sys/dev/scd/scd.c27
-rw-r--r--sys/dev/si/si.c8
7 files changed, 26 insertions, 49 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 9234fcf082d6d..c39a75f2edd1f 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -13,7 +13,7 @@
* the SMC Elite Ultra (8216), the 3Com 3c503, the NE1000 and NE2000,
* and a variety of similar clones.
*
- * $Id: if_ed.c,v 1.79 1995/10/21 00:55:23 phk Exp $
+ * $Id: if_ed.c,v 1.80 1995/10/26 20:29:27 julian Exp $
*/
#include "ed.h"
@@ -307,7 +307,6 @@ static inline void
ed_registerdev(struct isa_device *id, const char *descr)
{
struct kern_devconf *kdc = &ed_softc[id->id_unit].kdc;
- char *longdescr;
*kdc = kdc_ed_template;
kdc->kdc_unit = id->id_unit;
kdc->kdc_parentdata = id;
@@ -1289,7 +1288,7 @@ ed_probe_pccard(isa_dev, ether)
struct ed_softc *sc = &ed_softc[isa_dev->id_unit];
int i;
u_int memsize;
- u_char iptr, isa16bit, sum;
+ u_char isa16bit;
sc->nic_addr = isa_dev->id_iobase;
sc->gone = 0;
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c
index 0b5008dcd21e0..690f3eb34d76f 100644
--- a/sys/dev/ep/if_ep.c
+++ b/sys/dev/ep/if_ep.c
@@ -38,7 +38,7 @@
*/
/*
- * $Id: if_ep.c,v 1.31 1995/10/13 19:47:44 wollman Exp $
+ * $Id: if_ep.c,v 1.32 1995/10/26 20:29:37 julian Exp $
*
* Promiscuous mode added and interrupt logic slightly changed
* to reduce the number of adapter failures. Transceiver select
@@ -309,7 +309,6 @@ epprobe(is)
{
struct ep_softc *sc = &ep_softc[is->id_unit];
u_short k;
- int i;
ep_registerdev(is);
@@ -778,11 +777,8 @@ void
epintr(unit)
int unit;
{
- int i;
register int status;
register struct ep_softc *sc = &ep_softc[unit];
- struct ifnet *ifp = &sc->arpcom.ac_if;
- struct mbuf *m;
int x;
x=splbio();
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 8eb88583c107c..bca87e11c5699 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.65 1995/10/04 07:01:23 joerg Exp $
+ * $Id: fd.c,v 1.66 1995/10/09 15:00:36 joerg Exp $
*
*/
@@ -978,7 +978,6 @@ Fdopen(dev_t dev, int flags, int mode, struct proc *p)
fdu_t fdu = FDUNIT(minor(dev));
int type = FDTYPE(minor(dev));
fdc_p fdc;
- int st3;
#if NFT > 0
/* check for a tape open */
@@ -1260,7 +1259,7 @@ fdintr(fdcu_t fdcu)
static int
fdstate(fdcu_t fdcu, fdc_p fdc)
{
- int read, format, head, sec = 0, i = 0, sectrac, st0, cyl, st3;
+ int read, format, head, sec = 0, sectrac, st0, cyl, st3;
unsigned long blknum;
fdu_t fdu = fdc->fdu;
fd_p fd;
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c
index 632ef6c5c407f..b0a1b7fc05ce0 100644
--- a/sys/dev/lnc/if_lnc.c
+++ b/sys/dev/lnc/if_lnc.c
@@ -229,7 +229,6 @@ lnc_stop(int unit)
void
lnc_reset(int unit)
{
- int s;
lnc_init(unit);
}
@@ -825,10 +824,10 @@ lnc_tint(int unit)
int
lnc_probe(struct isa_device * isa_dev)
{
-int nports;
-int vsw;
+ int nports;
#ifdef DIAGNOSTIC
+ int vsw;
vsw = inw(isa_dev->id_iobase + PCNET_VSW);
printf("Vendor Specific Word = %x\n", vsw);
#endif
@@ -1120,7 +1119,6 @@ lnc_init(int unit)
struct lnc_softc *sc = &lnc_softc[unit];
int s, i;
char *lnc_mem;
- struct mbuf *m = 0;
/* Check that interface has valid address */
@@ -1423,7 +1421,6 @@ lnc_start(struct ifnet *ifp)
int end_of_packet;
struct mbuf *head, *m;
int len, chunk;
- char *buffer;
int addr;
int no_entries_needed;
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c
index fa3435e2a7d7a..d22984d3675d4 100644
--- a/sys/dev/mcd/mcd.c
+++ b/sys/dev/mcd/mcd.c
@@ -40,7 +40,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: mcd.c,v 1.45 1995/08/15 19:56:59 joerg Exp $
+ * $Id: mcd.c,v 1.46 1995/09/08 11:07:48 bde Exp $
*/
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
@@ -169,10 +169,11 @@ int mcdclose(dev_t dev, int flags, int fmt, struct proc *p);
void mcdstrategy(struct buf *bp);
int mcdioctl(dev_t dev, int cmd, caddr_t addr, int flags, struct proc *p);
int mcdsize(dev_t dev);
-static void mcd_done(struct mcd_mbx *mbx);
static void mcd_start(int unit);
static int mcd_getdisklabel(int unit);
+#ifdef NOTYET
static void mcd_configure(struct mcd_data *cd);
+#endif
static int mcd_get(int unit, char *buf, int nmax);
static int mcd_setflags(int unit,struct mcd_data *cd);
static int mcd_getstat(int unit,int sflg);
@@ -203,8 +204,8 @@ static int mcd_lock_door(int unit, int lock);
static int mcd_close_tray(int unit);
extern int hz;
-extern int mcd_probe(struct isa_device *dev);
-extern int mcd_attach(struct isa_device *dev);
+static int mcd_probe(struct isa_device *dev);
+static int mcd_attach(struct isa_device *dev);
struct isa_driver mcddriver = { mcd_probe, mcd_attach, "mcd" };
#define mcd_put(port,byte) outb(port,byte)
@@ -248,7 +249,6 @@ mcd_registerdev(struct isa_device *id)
int mcd_attach(struct isa_device *dev)
{
struct mcd_data *cd = mcd_data + dev->id_unit;
- int i;
cd->iobase = dev->id_iobase;
cd->flags |= MCDINIT;
@@ -449,7 +449,6 @@ static void mcd_start(int unit)
struct mcd_data *cd = mcd_data + unit;
struct buf *bp, *qp = &cd->head;
struct partition *p;
- int part;
register s = splbio();
if (cd->flags & MCDMBXBSY) {
@@ -679,11 +678,13 @@ drqs[] = {
};
#endif
+#ifdef NOT_YET
static void
mcd_configure(struct mcd_data *cd)
{
outb(cd->iobase+mcd_config,cd->config);
}
+#endif
/* Wait for non-busy - return 0 on timeout */
static int
@@ -707,7 +708,6 @@ mcd_probe(struct isa_device *dev)
int port = dev->id_iobase;
int unit = dev->id_unit;
int i, j;
- int status;
unsigned char stbytes[3];
mcd_registerdev(dev);
@@ -796,7 +796,6 @@ mcd_waitrdy(int port,int dly)
static int
mcd_getreply(int unit,int dly)
{
- int i;
struct mcd_data *cd = mcd_data + unit;
int port = cd->iobase;
@@ -854,7 +853,6 @@ mcd_setflags(int unit, struct mcd_data *cd)
static int
mcd_get(int unit, char *buf, int nmax)
{
- int port = mcd_data[unit].iobase;
int i,k;
for (i=0; i<nmax; i++) {
@@ -926,7 +924,6 @@ static int
mcd_volinfo(int unit)
{
struct mcd_data *cd = mcd_data + unit;
- int i;
/* Just return if we already have it */
if (cd->flags & MCDVOLINFO) return 0;
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c
index b5aacd8b3aa24..831d53e426847 100644
--- a/sys/dev/scd/scd.c
+++ b/sys/dev/scd/scd.c
@@ -41,7 +41,7 @@
*/
-/* $Id: scd.c,v 1.6 1995/09/08 11:07:55 bde Exp $ */
+/* $Id: scd.c,v 1.7 1995/09/19 18:55:15 bde Exp $ */
/* Please send any comments to micke@dynas.se */
@@ -100,7 +100,7 @@
#define SCDBLKSIZE 2048
#ifdef SCD_DEBUG
- int scd_debuglevel = SCD_DEBUG;
+ static int scd_debuglevel = SCD_DEBUG;
# define XDEBUG(level, data) {if (scd_debuglevel >= level) printf data;}
#else
# define XDEBUG(level, data)
@@ -118,7 +118,7 @@ struct scd_mbx {
short count;
};
-struct scd_data {
+static struct scd_data {
int iobase;
char double_speed;
char *name;
@@ -156,7 +156,6 @@ static int msf2hsg(bcd_t *msf);
static void process_attention(unsigned unit);
static inline void write_control(unsigned port, unsigned data);
static int waitfor_status_bits(int unit, int bits_set, int bits_clear);
-static int waitfor_attention(int unit);
static int send_cmd(u_int unit, u_char cmd, u_int nargs, ...);
static void init_drive(unsigned unit);
static int spin_up(unsigned unit);
@@ -184,8 +183,8 @@ static int scd_toc_entrys(int unit, struct ioc_read_toc_entry *te);
extern int hz;
-int scd_probe(struct isa_device *dev);
-int scd_attach(struct isa_device *dev);
+static int scd_probe(struct isa_device *dev);
+static int scd_attach(struct isa_device *dev);
struct isa_driver scddriver = { scd_probe, scd_attach, "scd" };
static struct kern_devconf kdc_scd[NSCD] = { {
@@ -212,7 +211,6 @@ scd_registerdev(struct isa_device *id)
int scd_attach(struct isa_device *dev)
{
struct scd_data *cd = scd_data + dev->id_unit;
- int i;
cd->iobase = dev->id_iobase; /* Already set by probe, but ... */
@@ -287,8 +285,6 @@ scdclose(dev_t dev, int flags, int fmt, struct proc *p)
{
int unit,part,phys;
struct scd_data *cd;
- int rlen;
- char rdata[10];
unit = scd_unit(dev);
if (unit >= NSCD)
@@ -386,7 +382,6 @@ scd_start(int unit)
struct scd_data *cd = scd_data + unit;
struct buf *bp, *qp = &cd->head;
struct partition *p;
- int part;
register s = splbio();
if (cd->flags & SCDMBXBSY) {
@@ -511,7 +506,7 @@ scd_playtracks(int unit, struct ioc_play_track *pt)
struct ioc_play_msf msf;
int a = pt->start_track;
int z = pt->end_track;
- int rc, i;
+ int rc;
if (!(cd->flags & SCDTOC) && (rc = read_toc(unit)) != 0) {
if (rc == -ERR_NOT_SPINNING) {
@@ -638,7 +633,6 @@ static int
scd_eject(int unit)
{
struct scd_data *cd = scd_data + unit;
- int port = cd->iobase;
cd->audio_status = CD_AS_AUDIO_INVALID;
cd->flags &= ~(SCDSPINNING|SCDTOC);
@@ -794,10 +788,9 @@ scd_doread(int state, struct scd_mbx *mbxin)
int port = mbx->port;
struct buf *bp = mbx->bp;
struct scd_data *cd = scd_data + unit;
- int reg,i,k,c;
+ int reg,i;
int blknum;
caddr_t addr;
- char rdata[10];
static char sdata[3]; /* Must be preserved between calls to this function */
loop:
@@ -836,7 +829,6 @@ trystat:
mbx->sz = cd->blksize;
-firstblock:
/* for first block */
mbx->nblk = (bp->b_bcount + (mbx->sz-1)) / mbx->sz;
mbx->skip = 0;
@@ -1093,7 +1085,6 @@ process_attention(unsigned unit)
unsigned port = scd_data[unit].iobase;
unsigned char code;
int count = 0;
- int i;
while (IS_ATTENTION(port) && count++ < 30) {
write_control(port, CBIT_ATTENTION_CLEAR);
@@ -1314,7 +1305,6 @@ get_result(u_int unit, int result_len, u_char *result)
{
unsigned int port = scd_data[unit].iobase;
unsigned int res_reg = port + IREG_RESULT;
- unsigned char c;
int loop_index = 2; /* send_cmd() reads two bytes ... */
XDEBUG(1, ("scd%d: DEBUG: get_result: bytes=%d\n", unit, result_len));
@@ -1375,7 +1365,8 @@ send_cmd(u_int unit, u_char cmd, u_int nargs, ...)
outb(port+OREG_COMMAND, cmd);
- if (rc = waitfor_status_bits(unit, SBIT_RESULT_READY, SBIT_BUSY))
+ rc = waitfor_status_bits(unit, SBIT_RESULT_READY, SBIT_BUSY);
+ if (rc)
return -0x100;
reg = port + IREG_RESULT;
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index e3b8f77042fb3..0c1c69ebae300 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.9 1995/09/22 20:00:12 peter Exp $
+ * $Id: si.c,v 1.10 1995/10/21 09:10:49 peter Exp $
*/
#ifndef lint
@@ -1198,11 +1198,9 @@ si_Sioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
volatile struct si_reg *regp;
struct si_tcsi *dp;
struct si_pstat *sps;
- BYTE *bp;
- int i, *ip, error = 0;
+ int *ip, error = 0;
int oldspl;
int card, port;
- unsigned short *usp;
int mynor = minor(dev);
DPRINT((0, DBG_ENTRY|DBG_IOCTL, "si_Sioctl(%x,%x,%x,%x)\n",
@@ -1675,7 +1673,7 @@ siintr(int unit)
volatile struct si_channel *ccbp;
register struct tty *tp;
volatile caddr_t maddr;
- BYTE op, ip, cc;
+ BYTE op, ip;
int x, card, port, n, i;
volatile BYTE *z;
BYTE c;