ansify function definitions
This commit is contained in:
parent
f7d20361b0
commit
4b83748ce5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: aic79xx_inline.h,v 1.16 2008/03/21 08:17:30 dyoung Exp $ */
|
||||
/* $NetBSD: aic79xx_inline.h,v 1.17 2009/03/15 15:52:12 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Inline routines shareable across OS platforms.
|
||||
@ -969,8 +969,7 @@ ahd_intr(void *arg)
|
||||
}
|
||||
|
||||
static __inline void
|
||||
ahd_minphys(bp)
|
||||
struct buf *bp;
|
||||
ahd_minphys(struct buf *bp)
|
||||
{
|
||||
/*
|
||||
* Even though the card can transfer up to 16megs per command
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: aic7xxx_inline.h,v 1.13 2008/02/11 21:43:46 dyoung Exp $ */
|
||||
/* $NetBSD: aic7xxx_inline.h,v 1.14 2009/03/15 15:52:12 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Inline routines shareable across OS platforms.
|
||||
@ -506,8 +506,7 @@ static __inline int ahc_intr(void *arg);
|
||||
static __inline void ahc_minphys(struct buf *bp);
|
||||
|
||||
static __inline void
|
||||
ahc_minphys(bp)
|
||||
struct buf *bp;
|
||||
ahc_minphys(struct buf *bp)
|
||||
{
|
||||
/*
|
||||
* Even though the card can transfer up to 16megs per command
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: aic7xxx_osm.h,v 1.20 2008/04/08 12:07:25 cegger Exp $ */
|
||||
/* $NetBSD: aic7xxx_osm.h,v 1.21 2009/03/15 15:52:12 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* NetBSD platform specific driver option settings, data structures,
|
||||
@ -297,7 +297,7 @@ ahc_done_unlock(struct ahc_softc *ahc, unsigned long *flags)
|
||||
|
||||
/* Lock held during ahc_list manipulation and ahc softc frees */
|
||||
static __inline void
|
||||
ahc_list_lockinit()
|
||||
ahc_list_lockinit(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: esiop.c,v 1.44 2009/03/14 21:04:19 dsl Exp $ */
|
||||
/* $NetBSD: esiop.c,v 1.45 2009/03/15 15:52:12 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Manuel Bouyer.
|
||||
@ -33,7 +33,7 @@
|
||||
/* SYM53c7/8xx PCI-SCSI I/O Processors driver */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: esiop.c,v 1.44 2009/03/14 21:04:19 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: esiop.c,v 1.45 2009/03/15 15:52:12 cegger Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -2155,7 +2155,7 @@ esiop_target_register(struct esiop_softc *sc, u_int32_t target)
|
||||
|
||||
#ifdef SIOP_STATS
|
||||
void
|
||||
esiop_printstats()
|
||||
esiop_printstats(void)
|
||||
{
|
||||
printf("esiop_stat_intr %d\n", esiop_stat_intr);
|
||||
printf("esiop_stat_intr_shortxfer %d\n", esiop_stat_intr_shortxfer);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: esiopvar.h,v 1.16 2007/12/25 18:33:38 perry Exp $ */
|
||||
/* $NetBSD: esiopvar.h,v 1.17 2009/03/15 15:52:12 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Manuel Bouyer.
|
||||
@ -123,9 +123,7 @@ struct esiop_target {
|
||||
|
||||
static __inline void esiop_table_sync(struct esiop_cmd *, int);
|
||||
static __inline void
|
||||
esiop_table_sync(esiop_cmd, ops)
|
||||
struct esiop_cmd *esiop_cmd;
|
||||
int ops;
|
||||
esiop_table_sync(struct esiop_cmd *esiop_cmd, int ops)
|
||||
{
|
||||
struct siop_common_softc *sc = esiop_cmd->cmd_c.siop_sc;
|
||||
bus_addr_t offset;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: midway.c,v 1.86 2009/03/14 15:36:17 dsl Exp $ */
|
||||
/* $NetBSD: midway.c,v 1.87 2009/03/15 15:52:12 cegger Exp $ */
|
||||
/* (sync'd to midway.c 1.68) */
|
||||
|
||||
/*
|
||||
@ -68,7 +68,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: midway.c,v 1.86 2009/03/14 15:36:17 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: midway.c,v 1.87 2009/03/15 15:52:12 cegger Exp $");
|
||||
|
||||
#include "opt_natm.h"
|
||||
|
||||
@ -495,11 +495,7 @@ static struct ifnet *en_vci2ifp(struct en_softc *, int);
|
||||
* that reads from the card.
|
||||
*/
|
||||
|
||||
STATIC INLINE u_int32_t en_read(sc, r)
|
||||
|
||||
struct en_softc *sc;
|
||||
u_int32_t r;
|
||||
|
||||
STATIC INLINE u_int32_t en_read(struct en_softc *sc, uint32_t r)
|
||||
{
|
||||
|
||||
#ifdef EN_DEBUG_RANGE
|
||||
@ -515,11 +511,7 @@ u_int32_t r;
|
||||
* writes to the card.
|
||||
*/
|
||||
|
||||
STATIC INLINE void en_write(sc, r, v)
|
||||
|
||||
struct en_softc *sc;
|
||||
u_int32_t r, v;
|
||||
|
||||
STATIC INLINE void en_write(struct en_softc *sc, uint32_t r, uint32_t v)
|
||||
{
|
||||
#ifdef EN_DEBUG_RANGE
|
||||
if (r > MID_MAXOFF || (r % 4))
|
||||
@ -533,10 +525,7 @@ u_int32_t r, v;
|
||||
* en_k2sz: convert KBytes to a size parameter (a log2)
|
||||
*/
|
||||
|
||||
STATIC INLINE int en_k2sz(k)
|
||||
|
||||
int k;
|
||||
|
||||
STATIC INLINE int en_k2sz(int k)
|
||||
{
|
||||
switch(k) {
|
||||
case 1: return(0);
|
||||
@ -558,10 +547,7 @@ int k;
|
||||
* en_b2sz: convert a DMA burst code to its byte size
|
||||
*/
|
||||
|
||||
STATIC INLINE int en_b2sz(b)
|
||||
|
||||
int b;
|
||||
|
||||
STATIC INLINE int en_b2sz(int b)
|
||||
{
|
||||
switch (b) {
|
||||
case MIDDMA_WORD: return(1*4);
|
||||
@ -583,10 +569,7 @@ int b;
|
||||
* en_sz2b: convert a burst size (bytes) to DMA burst code
|
||||
*/
|
||||
|
||||
STATIC INLINE int en_sz2b(sz)
|
||||
|
||||
int sz;
|
||||
|
||||
STATIC INLINE int en_sz2b(int sz)
|
||||
{
|
||||
switch (sz) {
|
||||
case 1*4: return(MIDDMA_WORD);
|
||||
@ -604,12 +587,7 @@ int sz;
|
||||
* en_dqneed: calculate number of DTQ/DRQ's needed for a buffer
|
||||
*/
|
||||
|
||||
STATIC INLINE int en_dqneed(sc, data, len, tx)
|
||||
|
||||
struct en_softc *sc;
|
||||
void *data;
|
||||
u_int len, tx;
|
||||
|
||||
STATIC INLINE int en_dqneed(struct en_softc *sc, void *data, u_int len, u_int tx)
|
||||
{
|
||||
int result, needalign, sz;
|
||||
|
||||
@ -670,11 +648,7 @@ u_int len, tx;
|
||||
* after this call the sum of all the m_len's in the chain will be totlen.
|
||||
*/
|
||||
|
||||
STATIC INLINE struct mbuf *en_mget(sc, totlen, drqneed)
|
||||
|
||||
struct en_softc *sc;
|
||||
u_int totlen, *drqneed;
|
||||
|
||||
STATIC INLINE struct mbuf *en_mget(struct en_softc *sc, u_int totlen, u_int *drqneed)
|
||||
{
|
||||
struct mbuf *m;
|
||||
struct mbuf *top, **mp;
|
||||
@ -725,10 +699,7 @@ u_int totlen, *drqneed;
|
||||
* autoconfig stuff
|
||||
*/
|
||||
|
||||
void en_attach(sc)
|
||||
|
||||
struct en_softc *sc;
|
||||
|
||||
void en_attach(struct en_softc *sc)
|
||||
{
|
||||
struct ifnet *ifp = &sc->enif;
|
||||
int sz;
|
||||
@ -934,10 +905,7 @@ done_probe:
|
||||
* p166: bestburstlen=64, alburst=0
|
||||
*/
|
||||
|
||||
STATIC void en_dmaprobe(sc)
|
||||
|
||||
struct en_softc *sc;
|
||||
|
||||
STATIC void en_dmaprobe(struct en_softc *sc)
|
||||
{
|
||||
u_int32_t srcbuf[64], dstbuf[64];
|
||||
u_int8_t *sp, *dp;
|
||||
@ -1009,12 +977,7 @@ struct en_softc *sc;
|
||||
*/
|
||||
|
||||
int
|
||||
en_dmaprobe_doit(sc, sp, dp, wmtry)
|
||||
|
||||
struct en_softc *sc;
|
||||
u_int8_t *sp, *dp;
|
||||
int wmtry;
|
||||
|
||||
en_dmaprobe_doit(struct en_softc *sc, uint8_t *sp, uint8_t *dp, int wmtry)
|
||||
{
|
||||
int lcv, retval = 4, cnt, count;
|
||||
u_int32_t reg, bcode, midvloc;
|
||||
@ -1145,12 +1108,7 @@ int wmtry;
|
||||
* txspeed[vci].
|
||||
*/
|
||||
|
||||
STATIC int en_ioctl(ifp, cmd, data)
|
||||
|
||||
struct ifnet *ifp;
|
||||
EN_IOCTL_CMDT cmd;
|
||||
void *data;
|
||||
|
||||
STATIC int en_ioctl(struct ifnet *ifp, EN_IOCTL_CMDT cmd, void *data)
|
||||
{
|
||||
#ifdef MISSING_IF_SOFTC
|
||||
struct en_softc *sc = (struct en_softc *)device_lookup_private(&en_cd, ifp->if_unit);
|
||||
@ -1347,12 +1305,7 @@ void *data;
|
||||
* en_rxctl: turn on and off VCs for recv.
|
||||
*/
|
||||
|
||||
STATIC int en_rxctl(sc, pi, on)
|
||||
|
||||
struct en_softc *sc;
|
||||
struct atm_pseudoioctl *pi;
|
||||
int on;
|
||||
|
||||
STATIC int en_rxctl(struct en_softc *sc, struct atm_pseudoioctl *pi, int on)
|
||||
{
|
||||
u_int s, vci, flags, slot;
|
||||
u_int32_t oldmode, newmode;
|
||||
@ -1445,10 +1398,7 @@ int on;
|
||||
* must en_init to recover.
|
||||
*/
|
||||
|
||||
void en_reset(sc)
|
||||
|
||||
struct en_softc *sc;
|
||||
|
||||
void en_reset(struct en_softc *sc)
|
||||
{
|
||||
struct mbuf *m;
|
||||
int lcv, slot;
|
||||
@ -1520,10 +1470,7 @@ struct en_softc *sc;
|
||||
* en_init: init board and sync the card with the data in the softc.
|
||||
*/
|
||||
|
||||
STATIC void en_init(sc)
|
||||
|
||||
struct en_softc *sc;
|
||||
|
||||
STATIC void en_init(struct en_softc *sc)
|
||||
{
|
||||
int vc, slot;
|
||||
u_int32_t loc;
|
||||
@ -1641,11 +1588,7 @@ struct en_softc *sc;
|
||||
* en_loadvc: load a vc tab entry from a slot
|
||||
*/
|
||||
|
||||
STATIC void en_loadvc(sc, vc)
|
||||
|
||||
struct en_softc *sc;
|
||||
int vc;
|
||||
|
||||
STATIC void en_loadvc(struct en_softc *sc, int vc)
|
||||
{
|
||||
int slot;
|
||||
u_int32_t reg = EN_READ(sc, MID_VC(vc));
|
||||
@ -1674,10 +1617,7 @@ int vc;
|
||||
* if there is one. note that atm_output() has already splnet()'d us.
|
||||
*/
|
||||
|
||||
STATIC void en_start(ifp)
|
||||
|
||||
struct ifnet *ifp;
|
||||
|
||||
STATIC void en_start(struct ifnet *ifp)
|
||||
{
|
||||
#ifdef MISSING_IF_SOFTC
|
||||
struct en_softc *sc = (struct en_softc *)device_lookup_private(&en_cd, ifp->if_unit);
|
||||
@ -1868,11 +1808,7 @@ struct ifnet *ifp;
|
||||
|
||||
#ifndef __FreeBSD__
|
||||
|
||||
STATIC int en_mfix(sc, mm, prev)
|
||||
|
||||
struct en_softc *sc;
|
||||
struct mbuf **mm, *prev;
|
||||
|
||||
STATIC int en_mfix(struct en_softc *sc, struct mbuf **mm, struct mbuf *prev)
|
||||
{
|
||||
struct mbuf *m, *new;
|
||||
u_char *d, *cp;
|
||||
@ -2076,11 +2012,7 @@ struct mbuf **mm, *prev;
|
||||
* en_txdma: start transmit DMA, if possible
|
||||
*/
|
||||
|
||||
STATIC void en_txdma(sc, chan)
|
||||
|
||||
struct en_softc *sc;
|
||||
int chan;
|
||||
|
||||
STATIC void en_txdma(struct en_softc *sc, int chan)
|
||||
{
|
||||
struct mbuf *tmp;
|
||||
struct atm_pseudohdr *ap;
|
||||
@ -2307,12 +2239,7 @@ dequeue_drop:
|
||||
* en_txlaunch: launch an mbuf into the DMA pool!
|
||||
*/
|
||||
|
||||
STATIC void en_txlaunch(sc, chan, l)
|
||||
|
||||
struct en_softc *sc;
|
||||
int chan;
|
||||
struct en_launch *l;
|
||||
|
||||
STATIC void en_txlaunch(struct en_softc *sc, int chan, struct en_launch *l)
|
||||
{
|
||||
struct mbuf *tmp;
|
||||
u_int32_t cur = sc->txslot[chan].cur,
|
||||
@ -2664,10 +2591,7 @@ done:
|
||||
* interrupt handler
|
||||
*/
|
||||
|
||||
EN_INTR_TYPE en_intr(arg)
|
||||
|
||||
void *arg;
|
||||
|
||||
EN_INTR_TYPE en_intr(void *arg)
|
||||
{
|
||||
struct en_softc *sc = (struct en_softc *) arg;
|
||||
struct mbuf *m;
|
||||
@ -2970,10 +2894,7 @@ void *arg;
|
||||
*
|
||||
*/
|
||||
|
||||
STATIC void en_service(sc)
|
||||
|
||||
struct en_softc *sc;
|
||||
|
||||
STATIC void en_service(struct en_softc *sc)
|
||||
{
|
||||
struct mbuf *m, *tmp;
|
||||
u_int32_t cur, dstart, rbd, pdu, *sav, dma, bcode, count, *data, *datastop;
|
||||
@ -3403,10 +3324,7 @@ done:
|
||||
|
||||
#define END_BITS "\20\7SWSL\6DRQ\5DTQ\4RX\3TX\2MREGS\1STATS"
|
||||
|
||||
int en_dump(unit, level)
|
||||
|
||||
int unit, level;
|
||||
|
||||
int en_dump(int unit, int level)
|
||||
{
|
||||
struct en_softc *sc;
|
||||
int lcv, cnt, slot;
|
||||
@ -3573,10 +3491,7 @@ int unit, level;
|
||||
* en_dumpmem: dump the memory
|
||||
*/
|
||||
|
||||
int en_dumpmem(unit, addr, len)
|
||||
|
||||
int unit, addr, len;
|
||||
|
||||
int en_dumpmem(int unit, int addr, int len)
|
||||
{
|
||||
struct en_softc *sc;
|
||||
u_int32_t reg;
|
||||
@ -3612,9 +3527,7 @@ int unit, addr, len;
|
||||
* a round-robin fashion when en_start is called from tx complete
|
||||
* interrupts.
|
||||
*/
|
||||
static void rrp_add(sc, ifp)
|
||||
struct en_softc *sc;
|
||||
struct ifnet *ifp;
|
||||
static void rrp_add(struct en_softc *sc, struct ifnet *ifp)
|
||||
{
|
||||
struct rrp *head, *p, *new;
|
||||
|
||||
@ -3655,9 +3568,7 @@ static void rrp_add(sc, ifp)
|
||||
}
|
||||
|
||||
#if 0 /* not used */
|
||||
static void rrp_delete(sc, ifp)
|
||||
struct en_softc *sc;
|
||||
struct ifnet *ifp;
|
||||
static void rrp_delete(struct en_softc *sc, struct ifnet *ifp)
|
||||
{
|
||||
struct rrp *head, *p, *prev;
|
||||
|
||||
@ -3747,8 +3658,7 @@ en_pvcattach(struct ifnet *ifp)
|
||||
by Werner Almesberger, EPFL LRC */
|
||||
static const int pre_div[] = { 4,16,128,2048 };
|
||||
|
||||
static int en_pcr2txspeed(pcr)
|
||||
int pcr;
|
||||
static int en_pcr2txspeed(int pcr)
|
||||
{
|
||||
int pre, res, div;
|
||||
|
||||
@ -3777,8 +3687,7 @@ static int en_pcr2txspeed(pcr)
|
||||
return ((pre << 6) + res);
|
||||
}
|
||||
|
||||
static int en_txspeed2pcr(txspeed)
|
||||
int txspeed;
|
||||
static int en_txspeed2pcr(int txspeed)
|
||||
{
|
||||
int pre, res, pcr;
|
||||
|
||||
@ -3794,11 +3703,7 @@ static int en_txspeed2pcr(txspeed)
|
||||
* since it assumes a transmit channel is already assigned by en_rxctl
|
||||
* to the vc.
|
||||
*/
|
||||
static int en_txctl(sc, vci, joint_vci, pcr)
|
||||
struct en_softc *sc;
|
||||
int vci;
|
||||
int joint_vci;
|
||||
int pcr;
|
||||
static int en_txctl(struct en_softc *sc, int vci, int joint_vci, int pcr)
|
||||
{
|
||||
int txspeed, txchan, s;
|
||||
|
||||
@ -3856,9 +3761,7 @@ static int en_txctl(sc, vci, joint_vci, pcr)
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int en_pvctx(sc, pvcreq)
|
||||
struct en_softc *sc;
|
||||
struct pvctxreq *pvcreq;
|
||||
static int en_pvctx(struct en_softc *sc, struct pvctxreq *pvcreq)
|
||||
{
|
||||
struct ifnet *ifp;
|
||||
struct atm_pseudoioctl api;
|
||||
@ -3963,9 +3866,7 @@ static int en_pvctx(sc, pvcreq)
|
||||
return error;
|
||||
}
|
||||
|
||||
static int en_pvctxget(sc, pvcreq)
|
||||
struct en_softc *sc;
|
||||
struct pvctxreq *pvcreq;
|
||||
static int en_pvctxget(struct en_softc *sc, struct pvctxreq *pvcreq)
|
||||
{
|
||||
struct pvcsif *pvcsif;
|
||||
struct ifnet *ifp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcdisplayvar.h,v 1.18 2006/05/14 21:42:27 elad Exp $ */
|
||||
/* $NetBSD: pcdisplayvar.h,v 1.19 2009/03/15 15:52:12 cegger Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998
|
||||
@ -55,18 +55,14 @@ static __inline u_int8_t _pcdisplay_6845_read(struct pcdisplay_handle *, int);
|
||||
static __inline void _pcdisplay_6845_write(struct pcdisplay_handle *, int,
|
||||
u_int8_t);
|
||||
|
||||
static __inline u_int8_t _pcdisplay_6845_read(ph, reg)
|
||||
struct pcdisplay_handle *ph;
|
||||
int reg;
|
||||
static __inline u_int8_t _pcdisplay_6845_read(struct pcdisplay_handle *ph, int reg)
|
||||
{
|
||||
bus_space_write_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_INDEX, reg);
|
||||
return (bus_space_read_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_DATA));
|
||||
}
|
||||
|
||||
static __inline void _pcdisplay_6845_write(ph, reg, val)
|
||||
struct pcdisplay_handle *ph;
|
||||
int reg;
|
||||
u_int8_t val;
|
||||
static __inline void _pcdisplay_6845_write(struct pcdisplay_handle *ph,
|
||||
int reg, uint8_t val)
|
||||
{
|
||||
bus_space_write_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_INDEX, reg);
|
||||
bus_space_write_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_DATA, val);
|
||||
|
Loading…
Reference in New Issue
Block a user