summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1994-05-27 04:02:10 +0000
committerrgrimes <rgrimes@FreeBSD.org>1994-05-27 04:02:10 +0000
commitf94dafd1d8472a7400f60d2f2770b879f1ccd605 (patch)
tree31cd7b235e375356e6a252ccf13bbc4979c8cb67
parent858ff2f517de2938bb4195de9f765a07aeb32007 (diff)
downloadFreeBSD-src-f94dafd1d8472a7400f60d2f2770b879f1ccd605.zip
FreeBSD-src-f94dafd1d8472a7400f60d2f2770b879f1ccd605.tar.gz
Cast arguments to timeout() to quite compiler warnings. Should we
change all of these to be timeout_funt_t and remove the casts and typedef? Remove secound argument (uban) from ifp->if_reset routines since it is now obsolete. Reviewed by: David Greenman
-rw-r--r--sys/dev/ie/if_ie.c10
-rw-r--r--sys/i386/isa/bt742a.c16
-rw-r--r--sys/i386/isa/if_ie.c10
-rw-r--r--sys/i386/isa/if_is.c10
-rw-r--r--sys/i386/isa/ultra14f.c10
-rw-r--r--sys/i386/isa/wt.c2
6 files changed, 33 insertions, 25 deletions
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index d4e1155..fbb1d5e 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -175,7 +175,7 @@ static int ieioctl(struct ifnet *ifp, int command, caddr_t data);
static void iestart(struct ifnet *ifp);
static void sl_reset_586(int unit);
static void sl_chan_attn(int unit);
-static void iereset(int unit, int dummy);
+static void iereset(int unit);
static void ie_readframe(int unit, struct ie_softc *ie, int bufno);
static void ie_drop_packet_buffer(int unit, struct ie_softc *ie);
static void sl_read_ether(int unit, unsigned char addr[6]);
@@ -745,7 +745,7 @@ static inline int ie_packet_len(int unit, struct ie_softc *ie) {
#endif
log(LOG_ERR, "ie%d: receive descriptors out of sync at %d\n",
unit, ie->rbhead);
- iereset(unit, 0);
+ iereset(unit);
return -1;
}
@@ -1055,7 +1055,7 @@ static void ie_drop_packet_buffer(int unit, struct ie_softc *ie) {
#endif
log(LOG_ERR, "ie%d: receive descriptors out of sync at %d\n",
unit, ie->rbhead);
- iereset(unit, 0);
+ iereset(unit);
return;
}
@@ -1281,8 +1281,8 @@ void sl_read_ether(unit, addr)
static void
-iereset(unit, dummy)
- int unit, dummy;
+iereset(unit)
+ int unit;
{
int s = splimp();
diff --git a/sys/i386/isa/bt742a.c b/sys/i386/isa/bt742a.c
index 58b53f9..9a53a7a 100644
--- a/sys/i386/isa/bt742a.c
+++ b/sys/i386/isa/bt742a.c
@@ -44,6 +44,10 @@
#define NBT 1
#endif /*KERNEL */
+#ifndef NetBSD
+typedef timeout_func_t timeout_t;
+#endif
+
typedef unsigned long int physaddr;
/*
@@ -717,7 +721,7 @@ btintr(unit)
}
wmbi->stat = BT_MBI_FREE;
if (ccb) {
- untimeout(bt_timeout, (caddr_t)ccb);
+ untimeout((timeout_t)bt_timeout, (caddr_t)ccb);
bt_done(unit, ccb);
}
/* Set the IN mail Box pointer for next */ bt_nextmbx(wmbi, wmbx, mbi);
@@ -1359,7 +1363,7 @@ bt_scsi_cmd(xs)
*/
SC_DEBUG(xs->sc_link, SDEV_DB3, ("cmd_sent\n"));
if (!(flags & SCSI_NOMASK)) {
- timeout(bt_timeout, (caddr_t)ccb, (xs->timeout * hz) / 1000);
+ timeout((timeout_t)bt_timeout, (caddr_t)ccb, (xs->timeout * hz) / 1000);
return (SUCCESSFULLY_QUEUED);
}
/*
@@ -1404,13 +1408,13 @@ bt_poll(unit, xs, ccb)
* accounting for the fact that the clock is not running yet
* by taking out the clock queue entry it makes.
*/
- bt_timeout((caddr_t)ccb, 0);
+ bt_timeout((caddr_t)ccb);
/*
* because we are polling, take out the timeout entry
* bt_timeout made
*/
- untimeout(bt_timeout, (caddr_t)ccb);
+ untimeout((timeout_t)bt_timeout, (caddr_t)ccb);
count = 2000;
while (count) {
/*
@@ -1431,7 +1435,7 @@ bt_poll(unit, xs, ccb)
* We timed out again... This is bad. Notice that
* this time there is no clock queue entry to remove.
*/
- bt_timeout((caddr_t)ccb, 0);
+ bt_timeout((caddr_t)ccb);
}
}
if (xs->error)
@@ -1485,7 +1489,7 @@ bt_timeout(caddr_t arg1)
bt_send_mbo(unit, ~SCSI_NOMASK,
BT_MBO_ABORT, ccb);
/* 2 secs for the abort */
- timeout(bt_timeout, (caddr_t)ccb, 2 * hz);
+ timeout((timeout_t)bt_timeout, (caddr_t)ccb, 2 * hz);
ccb->flags = CCB_ABORTED;
}
splx(s);
diff --git a/sys/i386/isa/if_ie.c b/sys/i386/isa/if_ie.c
index d4e1155..fbb1d5e 100644
--- a/sys/i386/isa/if_ie.c
+++ b/sys/i386/isa/if_ie.c
@@ -175,7 +175,7 @@ static int ieioctl(struct ifnet *ifp, int command, caddr_t data);
static void iestart(struct ifnet *ifp);
static void sl_reset_586(int unit);
static void sl_chan_attn(int unit);
-static void iereset(int unit, int dummy);
+static void iereset(int unit);
static void ie_readframe(int unit, struct ie_softc *ie, int bufno);
static void ie_drop_packet_buffer(int unit, struct ie_softc *ie);
static void sl_read_ether(int unit, unsigned char addr[6]);
@@ -745,7 +745,7 @@ static inline int ie_packet_len(int unit, struct ie_softc *ie) {
#endif
log(LOG_ERR, "ie%d: receive descriptors out of sync at %d\n",
unit, ie->rbhead);
- iereset(unit, 0);
+ iereset(unit);
return -1;
}
@@ -1055,7 +1055,7 @@ static void ie_drop_packet_buffer(int unit, struct ie_softc *ie) {
#endif
log(LOG_ERR, "ie%d: receive descriptors out of sync at %d\n",
unit, ie->rbhead);
- iereset(unit, 0);
+ iereset(unit);
return;
}
@@ -1281,8 +1281,8 @@ void sl_read_ether(unit, addr)
static void
-iereset(unit, dummy)
- int unit, dummy;
+iereset(unit)
+ int unit;
{
int s = splimp();
diff --git a/sys/i386/isa/if_is.c b/sys/i386/isa/if_is.c
index 2df9bb4..fc0dcae 100644
--- a/sys/i386/isa/if_is.c
+++ b/sys/i386/isa/if_is.c
@@ -279,7 +279,7 @@ int type=0;
* Reset of interface.
*/
static void
-is_reset(int unit, int uban)
+is_reset(int unit)
{
int s;
struct is_softc *is = &is_softc[unit];
@@ -395,7 +395,7 @@ is_watchdog(unit)
int unit;
{
log(LOG_ERR, "is%d: device timeout\n", unit);
- is_reset(unit, 0);
+ is_reset(unit);
}
@@ -695,13 +695,13 @@ isintr(unit)
if (!(isr&RXON)) {
printf("is%d: !(isr&RXON)\n", unit);
is->arpcom.ac_if.if_ierrors++;
- is_reset(unit, 0);
+ is_reset(unit);
return;
}
if (!(isr&TXON)) {
printf("is%d: !(isr&TXON)\n", unit);
is->arpcom.ac_if.if_oerrors++;
- is_reset(unit, 0);
+ is_reset(unit);
return;
}
@@ -791,7 +791,7 @@ static inline void is_rint(int unit)
is->last_rd = rmd;
printf("is%d: Chained buffer\n",unit);
if ((cdm->flags & (OWN|ERR|STP|ENP)) != ENP) {
- is_reset(unit, 0);
+ is_reset(unit);
return;
}
}else
diff --git a/sys/i386/isa/ultra14f.c b/sys/i386/isa/ultra14f.c
index b901744..aa99917 100644
--- a/sys/i386/isa/ultra14f.c
+++ b/sys/i386/isa/ultra14f.c
@@ -50,6 +50,10 @@
#define NUHA 1
#endif /*KERNEL */
+#ifndef NetBSD
+typedef timeout_func_t timeout_t;
+#endif
+
typedef struct {
unsigned char addr[4];
} physaddr;
@@ -525,7 +529,7 @@ uhaintr(unit)
printf("uha: BAD MSCP RETURNED\n");
return (0); /* whatever it was, it'll timeout */
}
- untimeout(uha_timeout, (caddr_t)mscp);
+ untimeout((timeout_t)uha_timeout, (caddr_t)mscp);
uha_done(unit, mscp);
}
@@ -1046,7 +1050,7 @@ uha_scsi_cmd(xs)
if (!(flags & SCSI_NOMASK)) {
s = splbio();
uha_send_mbox(unit, mscp);
- timeout(uha_timeout, (caddr_t)mscp, (xs->timeout * hz) / 1000);
+ timeout((timeout_t)uha_timeout, (caddr_t)mscp, (xs->timeout * hz) / 1000);
splx(s);
SC_DEBUG(xs->sc_link, SDEV_DB3, ("cmd_sent\n"));
return (SUCCESSFULLY_QUEUED);
@@ -1103,7 +1107,7 @@ uha_timeout(caddr_t arg1)
uha_done(unit, mscp, FAIL);
} else { /* abort the operation that has timed out */
printf("\n");
- timeout(uha_timeout, (caddr_t)mscp, 2 * hz);
+ timeout((timeout_t)uha_timeout, (caddr_t)mscp, 2 * hz);
mscp->flags = MSCP_ABORTED;
}
splx(s);
diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c
index 5ed78a2..21a6ed9 100644
--- a/sys/i386/isa/wt.c
+++ b/sys/i386/isa/wt.c
@@ -773,7 +773,7 @@ static void wtclock (wtinfo_t *t)
t->flags |= TPTIMER;
/* Some controllers seem to lose dma interrupts too often.
* To make the tape stream we need 1 tick timeout. */
- timeout (wtimer, (caddr_t)t, (t->flags & TPACTIVE) ? 1 : hz);
+ timeout ((timeout_func_t)wtimer, (caddr_t)t, (t->flags & TPACTIVE) ? 1 : hz);
}
}
OpenPOWER on IntegriCloud