diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1993-12-19 00:55:01 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1993-12-19 00:55:01 +0000 |
commit | aaf08d94cad23fc4be2c840a0782f9468c519927 (patch) | |
tree | 62dff2aa17f4c31d27a9595b764f9cbc9810eb80 /sys/dev/mcd/mcd.c | |
parent | b39c878e2bd38f964f203f75d2f33b9838add0f2 (diff) | |
download | src-aaf08d94cad23fc4be2c840a0782f9468c519927.tar.gz src-aaf08d94cad23fc4be2c840a0782f9468c519927.zip |
Make everything compile with -Wtraditional. Make it easier to distribute
a binary link-kit. Make all non-optional options (pagers, procfs) standard,
and update LINT to reflect new symtab requirements.
NB: -Wtraditional will henceforth be forgotten. This editing pass was
primarily intended to detect any constructions where the old code might
have been relying on traditional C semantics or syntax. These were all
fixed, and the result of fixing some of them means that -Wall is now a
realistic possibility within a few weeks.
Notes
Notes:
svn path=/head/; revision=879
Diffstat (limited to 'sys/dev/mcd/mcd.c')
-rw-r--r-- | sys/dev/mcd/mcd.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index 97b3f51d99c4..f4802bcc4439 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/mcd.c @@ -34,7 +34,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.2 1993/10/16 13:46:13 rgrimes Exp $ + * $Id: mcd.c,v 1.3 1993/11/25 01:31:43 wollman Exp $ */ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -68,7 +68,7 @@ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; #undef MCD_TO_WARNING_ON #endif #else -#define MCD_TRACE(fmt,a,b,c,d) {if (mcd_data[unit].debug) {printf("mcd%d st=%02x: ",unit,mcd_data[unit].status); printf(fmt,a,b,c,d);}} +#define MCD_TRACE(fmt,a,b,c,xd) {if (mcd_data[unit].debug) {printf("mcd%d st=%02x: ",unit,mcd_data[unit].status); printf(fmt,a,b,c,xd);}} #endif #define mcd_part(dev) ((minor(dev)) & 7) @@ -158,7 +158,7 @@ static void hsg2msf(int hsg, bcd_t *msf); static int msf2hsg(bcd_t *msf); static int mcd_volinfo(int unit); static int mcd_waitrdy(int port,int dly); -static void mcd_doread(int state, struct mcd_mbx *mbxin); +static void mcd_doread(caddr_t, int); #ifndef MCDMINI static int mcd_setmode(int unit, int mode); static int mcd_getqchan(int unit, struct mcd_qchninfo *q); @@ -397,7 +397,7 @@ static void mcd_start(int unit) cd->mbx.p_offset = p->p_offset; /* calling the read routine */ - mcd_doread(MCD_S_BEGIN,&(cd->mbx)); + mcd_doread((caddr_t)MCD_S_BEGIN, (int)&(cd->mbx)); /* triggers mcd_start, when successful finished */ return; } @@ -811,8 +811,13 @@ mcdintr(unit) */ static struct mcd_mbx *mbxsave; -static void mcd_doread(int state, struct mcd_mbx *mbxin) +/* + * Good thing Alphas come with real CD players... + */ +static void mcd_doread(caddr_t xstate, int xmbxin) { + int state = (int)xstate; + struct mcd_mbx *mbxin = (struct mcd_mbx *)xmbxin; struct mcd_mbx *mbx = (state!=MCD_S_BEGIN) ? mbxsave : mbxin; int unit = mbx->unit; int port = mbx->port; @@ -836,7 +841,7 @@ loop: timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */ return; case MCD_S_WAITSTAT: - untimeout(mcd_doread,MCD_S_WAITSTAT); + untimeout(mcd_doread, (caddr_t)MCD_S_WAITSTAT); if (mbx->count-- >= 0) { if (inb(port+mcd_xfer) & MCD_ST_BUSY) { timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITSTAT,hz/100); /* XXX */ @@ -873,7 +878,7 @@ loop: } case MCD_S_WAITMODE: - untimeout(mcd_doread,MCD_S_WAITMODE); + untimeout(mcd_doread, (caddr_t)MCD_S_WAITMODE); if (mbx->count-- < 0) { #ifdef MCD_TO_WARNING_ON printf("mcd%d: timeout set mode\n",unit); @@ -911,7 +916,7 @@ nextblock: timeout((timeout_func_t)mcd_doread,(caddr_t)MCD_S_WAITREAD,hz/100); /* XXX */ return; case MCD_S_WAITREAD: - untimeout(mcd_doread,MCD_S_WAITREAD); + untimeout(mcd_doread,(caddr_t)MCD_S_WAITREAD); if (mbx->count-- > 0) { k = inb(port+mcd_xfer); if ((k & 2)==0) { |