ansify function definitions

This commit is contained in:
cegger 2009-03-15 15:52:12 +00:00
parent f7d20361b0
commit 4b83748ce5
7 changed files with 47 additions and 154 deletions

View File

@ -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. * Inline routines shareable across OS platforms.
@ -969,8 +969,7 @@ ahd_intr(void *arg)
} }
static __inline void static __inline void
ahd_minphys(bp) ahd_minphys(struct buf *bp)
struct buf *bp;
{ {
/* /*
* Even though the card can transfer up to 16megs per command * Even though the card can transfer up to 16megs per command

View File

@ -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. * 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(struct buf *bp);
static __inline void static __inline void
ahc_minphys(bp) ahc_minphys(struct buf *bp)
struct buf *bp;
{ {
/* /*
* Even though the card can transfer up to 16megs per command * Even though the card can transfer up to 16megs per command

View File

@ -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, * 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 */ /* Lock held during ahc_list manipulation and ahc softc frees */
static __inline void static __inline void
ahc_list_lockinit() ahc_list_lockinit(void)
{ {
} }

View File

@ -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. * Copyright (c) 2002 Manuel Bouyer.
@ -33,7 +33,7 @@
/* SYM53c7/8xx PCI-SCSI I/O Processors driver */ /* SYM53c7/8xx PCI-SCSI I/O Processors driver */
#include <sys/cdefs.h> #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/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -2155,7 +2155,7 @@ esiop_target_register(struct esiop_softc *sc, u_int32_t target)
#ifdef SIOP_STATS #ifdef SIOP_STATS
void void
esiop_printstats() esiop_printstats(void)
{ {
printf("esiop_stat_intr %d\n", esiop_stat_intr); printf("esiop_stat_intr %d\n", esiop_stat_intr);
printf("esiop_stat_intr_shortxfer %d\n", esiop_stat_intr_shortxfer); printf("esiop_stat_intr_shortxfer %d\n", esiop_stat_intr_shortxfer);

View File

@ -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. * 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(struct esiop_cmd *, int);
static __inline void static __inline void
esiop_table_sync(esiop_cmd, ops) esiop_table_sync(struct esiop_cmd *esiop_cmd, int ops)
struct esiop_cmd *esiop_cmd;
int ops;
{ {
struct siop_common_softc *sc = esiop_cmd->cmd_c.siop_sc; struct siop_common_softc *sc = esiop_cmd->cmd_c.siop_sc;
bus_addr_t offset; bus_addr_t offset;

View File

@ -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) */ /* (sync'd to midway.c 1.68) */
/* /*
@ -68,7 +68,7 @@
*/ */
#include <sys/cdefs.h> #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" #include "opt_natm.h"
@ -495,11 +495,7 @@ static struct ifnet *en_vci2ifp(struct en_softc *, int);
* that reads from the card. * that reads from the card.
*/ */
STATIC INLINE u_int32_t en_read(sc, r) STATIC INLINE u_int32_t en_read(struct en_softc *sc, uint32_t r)
struct en_softc *sc;
u_int32_t r;
{ {
#ifdef EN_DEBUG_RANGE #ifdef EN_DEBUG_RANGE
@ -515,11 +511,7 @@ u_int32_t r;
* writes to the card. * writes to the card.
*/ */
STATIC INLINE void en_write(sc, r, v) STATIC INLINE void en_write(struct en_softc *sc, uint32_t r, uint32_t v)
struct en_softc *sc;
u_int32_t r, v;
{ {
#ifdef EN_DEBUG_RANGE #ifdef EN_DEBUG_RANGE
if (r > MID_MAXOFF || (r % 4)) 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) * en_k2sz: convert KBytes to a size parameter (a log2)
*/ */
STATIC INLINE int en_k2sz(k) STATIC INLINE int en_k2sz(int k)
int k;
{ {
switch(k) { switch(k) {
case 1: return(0); case 1: return(0);
@ -558,10 +547,7 @@ int k;
* en_b2sz: convert a DMA burst code to its byte size * en_b2sz: convert a DMA burst code to its byte size
*/ */
STATIC INLINE int en_b2sz(b) STATIC INLINE int en_b2sz(int b)
int b;
{ {
switch (b) { switch (b) {
case MIDDMA_WORD: return(1*4); case MIDDMA_WORD: return(1*4);
@ -583,10 +569,7 @@ int b;
* en_sz2b: convert a burst size (bytes) to DMA burst code * en_sz2b: convert a burst size (bytes) to DMA burst code
*/ */
STATIC INLINE int en_sz2b(sz) STATIC INLINE int en_sz2b(int sz)
int sz;
{ {
switch (sz) { switch (sz) {
case 1*4: return(MIDDMA_WORD); case 1*4: return(MIDDMA_WORD);
@ -604,12 +587,7 @@ int sz;
* en_dqneed: calculate number of DTQ/DRQ's needed for a buffer * en_dqneed: calculate number of DTQ/DRQ's needed for a buffer
*/ */
STATIC INLINE int en_dqneed(sc, data, len, tx) STATIC INLINE int en_dqneed(struct en_softc *sc, void *data, u_int len, u_int tx)
struct en_softc *sc;
void *data;
u_int len, tx;
{ {
int result, needalign, sz; 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. * 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) STATIC INLINE struct mbuf *en_mget(struct en_softc *sc, u_int totlen, u_int *drqneed)
struct en_softc *sc;
u_int totlen, *drqneed;
{ {
struct mbuf *m; struct mbuf *m;
struct mbuf *top, **mp; struct mbuf *top, **mp;
@ -725,10 +699,7 @@ u_int totlen, *drqneed;
* autoconfig stuff * autoconfig stuff
*/ */
void en_attach(sc) void en_attach(struct en_softc *sc)
struct en_softc *sc;
{ {
struct ifnet *ifp = &sc->enif; struct ifnet *ifp = &sc->enif;
int sz; int sz;
@ -934,10 +905,7 @@ done_probe:
* p166: bestburstlen=64, alburst=0 * p166: bestburstlen=64, alburst=0
*/ */
STATIC void en_dmaprobe(sc) STATIC void en_dmaprobe(struct en_softc *sc)
struct en_softc *sc;
{ {
u_int32_t srcbuf[64], dstbuf[64]; u_int32_t srcbuf[64], dstbuf[64];
u_int8_t *sp, *dp; u_int8_t *sp, *dp;
@ -1009,12 +977,7 @@ struct en_softc *sc;
*/ */
int int
en_dmaprobe_doit(sc, sp, dp, wmtry) en_dmaprobe_doit(struct en_softc *sc, uint8_t *sp, uint8_t *dp, int wmtry)
struct en_softc *sc;
u_int8_t *sp, *dp;
int wmtry;
{ {
int lcv, retval = 4, cnt, count; int lcv, retval = 4, cnt, count;
u_int32_t reg, bcode, midvloc; u_int32_t reg, bcode, midvloc;
@ -1145,12 +1108,7 @@ int wmtry;
* txspeed[vci]. * txspeed[vci].
*/ */
STATIC int en_ioctl(ifp, cmd, data) STATIC int en_ioctl(struct ifnet *ifp, EN_IOCTL_CMDT cmd, void *data)
struct ifnet *ifp;
EN_IOCTL_CMDT cmd;
void *data;
{ {
#ifdef MISSING_IF_SOFTC #ifdef MISSING_IF_SOFTC
struct en_softc *sc = (struct en_softc *)device_lookup_private(&en_cd, ifp->if_unit); 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. * en_rxctl: turn on and off VCs for recv.
*/ */
STATIC int en_rxctl(sc, pi, on) STATIC int en_rxctl(struct en_softc *sc, struct atm_pseudoioctl *pi, int on)
struct en_softc *sc;
struct atm_pseudoioctl *pi;
int on;
{ {
u_int s, vci, flags, slot; u_int s, vci, flags, slot;
u_int32_t oldmode, newmode; u_int32_t oldmode, newmode;
@ -1445,10 +1398,7 @@ int on;
* must en_init to recover. * must en_init to recover.
*/ */
void en_reset(sc) void en_reset(struct en_softc *sc)
struct en_softc *sc;
{ {
struct mbuf *m; struct mbuf *m;
int lcv, slot; 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. * en_init: init board and sync the card with the data in the softc.
*/ */
STATIC void en_init(sc) STATIC void en_init(struct en_softc *sc)
struct en_softc *sc;
{ {
int vc, slot; int vc, slot;
u_int32_t loc; u_int32_t loc;
@ -1641,11 +1588,7 @@ struct en_softc *sc;
* en_loadvc: load a vc tab entry from a slot * en_loadvc: load a vc tab entry from a slot
*/ */
STATIC void en_loadvc(sc, vc) STATIC void en_loadvc(struct en_softc *sc, int vc)
struct en_softc *sc;
int vc;
{ {
int slot; int slot;
u_int32_t reg = EN_READ(sc, MID_VC(vc)); 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. * if there is one. note that atm_output() has already splnet()'d us.
*/ */
STATIC void en_start(ifp) STATIC void en_start(struct ifnet *ifp)
struct ifnet *ifp;
{ {
#ifdef MISSING_IF_SOFTC #ifdef MISSING_IF_SOFTC
struct en_softc *sc = (struct en_softc *)device_lookup_private(&en_cd, ifp->if_unit); struct en_softc *sc = (struct en_softc *)device_lookup_private(&en_cd, ifp->if_unit);
@ -1868,11 +1808,7 @@ struct ifnet *ifp;
#ifndef __FreeBSD__ #ifndef __FreeBSD__
STATIC int en_mfix(sc, mm, prev) STATIC int en_mfix(struct en_softc *sc, struct mbuf **mm, struct mbuf *prev)
struct en_softc *sc;
struct mbuf **mm, *prev;
{ {
struct mbuf *m, *new; struct mbuf *m, *new;
u_char *d, *cp; u_char *d, *cp;
@ -2076,11 +2012,7 @@ struct mbuf **mm, *prev;
* en_txdma: start transmit DMA, if possible * en_txdma: start transmit DMA, if possible
*/ */
STATIC void en_txdma(sc, chan) STATIC void en_txdma(struct en_softc *sc, int chan)
struct en_softc *sc;
int chan;
{ {
struct mbuf *tmp; struct mbuf *tmp;
struct atm_pseudohdr *ap; struct atm_pseudohdr *ap;
@ -2307,12 +2239,7 @@ dequeue_drop:
* en_txlaunch: launch an mbuf into the DMA pool! * en_txlaunch: launch an mbuf into the DMA pool!
*/ */
STATIC void en_txlaunch(sc, chan, l) STATIC void en_txlaunch(struct en_softc *sc, int chan, struct en_launch *l)
struct en_softc *sc;
int chan;
struct en_launch *l;
{ {
struct mbuf *tmp; struct mbuf *tmp;
u_int32_t cur = sc->txslot[chan].cur, u_int32_t cur = sc->txslot[chan].cur,
@ -2664,10 +2591,7 @@ done:
* interrupt handler * interrupt handler
*/ */
EN_INTR_TYPE en_intr(arg) EN_INTR_TYPE en_intr(void *arg)
void *arg;
{ {
struct en_softc *sc = (struct en_softc *) arg; struct en_softc *sc = (struct en_softc *) arg;
struct mbuf *m; struct mbuf *m;
@ -2970,10 +2894,7 @@ void *arg;
* *
*/ */
STATIC void en_service(sc) STATIC void en_service(struct en_softc *sc)
struct en_softc *sc;
{ {
struct mbuf *m, *tmp; struct mbuf *m, *tmp;
u_int32_t cur, dstart, rbd, pdu, *sav, dma, bcode, count, *data, *datastop; 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" #define END_BITS "\20\7SWSL\6DRQ\5DTQ\4RX\3TX\2MREGS\1STATS"
int en_dump(unit, level) int en_dump(int unit, int level)
int unit, level;
{ {
struct en_softc *sc; struct en_softc *sc;
int lcv, cnt, slot; int lcv, cnt, slot;
@ -3573,10 +3491,7 @@ int unit, level;
* en_dumpmem: dump the memory * en_dumpmem: dump the memory
*/ */
int en_dumpmem(unit, addr, len) int en_dumpmem(int unit, int addr, int len)
int unit, addr, len;
{ {
struct en_softc *sc; struct en_softc *sc;
u_int32_t reg; u_int32_t reg;
@ -3612,9 +3527,7 @@ int unit, addr, len;
* a round-robin fashion when en_start is called from tx complete * a round-robin fashion when en_start is called from tx complete
* interrupts. * interrupts.
*/ */
static void rrp_add(sc, ifp) static void rrp_add(struct en_softc *sc, struct ifnet *ifp)
struct en_softc *sc;
struct ifnet *ifp;
{ {
struct rrp *head, *p, *new; struct rrp *head, *p, *new;
@ -3655,9 +3568,7 @@ static void rrp_add(sc, ifp)
} }
#if 0 /* not used */ #if 0 /* not used */
static void rrp_delete(sc, ifp) static void rrp_delete(struct en_softc *sc, struct ifnet *ifp)
struct en_softc *sc;
struct ifnet *ifp;
{ {
struct rrp *head, *p, *prev; struct rrp *head, *p, *prev;
@ -3747,8 +3658,7 @@ en_pvcattach(struct ifnet *ifp)
by Werner Almesberger, EPFL LRC */ by Werner Almesberger, EPFL LRC */
static const int pre_div[] = { 4,16,128,2048 }; static const int pre_div[] = { 4,16,128,2048 };
static int en_pcr2txspeed(pcr) static int en_pcr2txspeed(int pcr)
int pcr;
{ {
int pre, res, div; int pre, res, div;
@ -3777,8 +3687,7 @@ static int en_pcr2txspeed(pcr)
return ((pre << 6) + res); return ((pre << 6) + res);
} }
static int en_txspeed2pcr(txspeed) static int en_txspeed2pcr(int txspeed)
int txspeed;
{ {
int pre, res, pcr; 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 * since it assumes a transmit channel is already assigned by en_rxctl
* to the vc. * to the vc.
*/ */
static int en_txctl(sc, vci, joint_vci, pcr) static int en_txctl(struct en_softc *sc, int vci, int joint_vci, int pcr)
struct en_softc *sc;
int vci;
int joint_vci;
int pcr;
{ {
int txspeed, txchan, s; int txspeed, txchan, s;
@ -3856,9 +3761,7 @@ static int en_txctl(sc, vci, joint_vci, pcr)
return (0); return (0);
} }
static int en_pvctx(sc, pvcreq) static int en_pvctx(struct en_softc *sc, struct pvctxreq *pvcreq)
struct en_softc *sc;
struct pvctxreq *pvcreq;
{ {
struct ifnet *ifp; struct ifnet *ifp;
struct atm_pseudoioctl api; struct atm_pseudoioctl api;
@ -3963,9 +3866,7 @@ static int en_pvctx(sc, pvcreq)
return error; return error;
} }
static int en_pvctxget(sc, pvcreq) static int en_pvctxget(struct en_softc *sc, struct pvctxreq *pvcreq)
struct en_softc *sc;
struct pvctxreq *pvcreq;
{ {
struct pvcsif *pvcsif; struct pvcsif *pvcsif;
struct ifnet *ifp; struct ifnet *ifp;

View File

@ -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 * 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, static __inline void _pcdisplay_6845_write(struct pcdisplay_handle *, int,
u_int8_t); u_int8_t);
static __inline u_int8_t _pcdisplay_6845_read(ph, reg) static __inline u_int8_t _pcdisplay_6845_read(struct pcdisplay_handle *ph, int reg)
struct pcdisplay_handle *ph;
int reg;
{ {
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_INDEX, reg);
return (bus_space_read_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_DATA)); return (bus_space_read_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_DATA));
} }
static __inline void _pcdisplay_6845_write(ph, reg, val) static __inline void _pcdisplay_6845_write(struct pcdisplay_handle *ph,
struct pcdisplay_handle *ph; int reg, uint8_t val)
int reg;
u_int8_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_INDEX, reg);
bus_space_write_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_DATA, val); bus_space_write_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_DATA, val);