summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-09-28 17:15:38 +0000
committerphk <phk@FreeBSD.org>2002-09-28 17:15:38 +0000
commit1dfc2c167f0c0ee95c98088b2c05b50350b97ddb (patch)
tree072f805928e7e540a4d2c0a3a7ec37f7529204a0 /sys/dev
parent523f5243860c40ec5c7a3e961080d6035dbcb435 (diff)
downloadFreeBSD-src-1dfc2c167f0c0ee95c98088b2c05b50350b97ddb.zip
FreeBSD-src-1dfc2c167f0c0ee95c98088b2c05b50350b97ddb.tar.gz
Be consistent about "static" functions: if the function is marked
static in its prototype, mark it static at the definition too. Inspired by: FlexeLint warning #512
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/advansys/advansys.c2
-rw-r--r--sys/dev/aic/aic.c2
-rw-r--r--sys/dev/aic7xxx/aic7xxx.c2
-rw-r--r--sys/dev/amr/amr.c10
-rw-r--r--sys/dev/an/if_an.c2
-rw-r--r--sys/dev/ata/atapi-cam.c2
-rw-r--r--sys/dev/bktr/bktr_core.c6
-rw-r--r--sys/dev/bktr/bktr_os.c15
-rw-r--r--sys/dev/ciss/ciss.c2
-rw-r--r--sys/dev/dgb/dgb.c2
-rw-r--r--sys/dev/digi/digi.c8
-rw-r--r--sys/dev/ed/if_ed.c4
-rw-r--r--sys/dev/fdc/fdc.c8
-rw-r--r--sys/dev/fe/if_fe.c2
-rw-r--r--sys/dev/ie/if_ie.c28
-rw-r--r--sys/dev/iir/iir.c4
-rw-r--r--sys/dev/lge/if_lge.c2
-rw-r--r--sys/dev/mii/pnaphy.c2
-rw-r--r--sys/dev/mii/rlphy.c2
-rw-r--r--sys/dev/sio/sio.c6
-rw-r--r--sys/dev/syscons/syscons.c10
21 files changed, 61 insertions, 60 deletions
diff --git a/sys/dev/advansys/advansys.c b/sys/dev/advansys/advansys.c
index 40287e9..fcd7d3f 100644
--- a/sys/dev/advansys/advansys.c
+++ b/sys/dev/advansys/advansys.c
@@ -1030,7 +1030,7 @@ adv_intr(void *arg)
ADV_OUTB(adv, ADV_CHIP_CTRL, saved_ctrl_reg);
}
-void
+static void
adv_run_doneq(struct adv_softc *adv)
{
struct adv_q_done_info scsiq;
diff --git a/sys/dev/aic/aic.c b/sys/dev/aic/aic.c
index 57ac112..355968e 100644
--- a/sys/dev/aic/aic.c
+++ b/sys/dev/aic/aic.c
@@ -499,7 +499,7 @@ aic_spiordy(struct aic_softc *aic)
/*
* Reestablish a disconnected nexus.
*/
-void
+static void
aic_reconnect(struct aic_softc *aic, int tag)
{
struct aic_scb *scb;
diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c
index bb67c5c..a63000b 100644
--- a/sys/dev/aic7xxx/aic7xxx.c
+++ b/sys/dev/aic7xxx/aic7xxx.c
@@ -1573,7 +1573,7 @@ ahc_free_tstate(struct ahc_softc *ahc, u_int scsi_id, char channel, int force)
* by the capabilities of the bus connectivity of and sync settings for
* the target.
*/
-struct ahc_syncrate *
+static struct ahc_syncrate *
ahc_devlimited_syncrate(struct ahc_softc *ahc,
struct ahc_initiator_tinfo *tinfo,
u_int *period, u_int *ppr_options, role_t role)
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index ff8c472..44c0a2d 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -339,7 +339,7 @@ amr_submit_bio(struct amr_softc *sc, struct bio *bio)
/********************************************************************************
* Accept an open operation on the control device.
*/
-int
+static int
amr_open(dev_t dev, int flags, int fmt, struct thread *td)
{
int unit = minor(dev);
@@ -354,7 +354,7 @@ amr_open(dev_t dev, int flags, int fmt, struct thread *td)
/********************************************************************************
* Accept the last close on the control device.
*/
-int
+static int
amr_close(dev_t dev, int flags, int fmt, struct thread *td)
{
int unit = minor(dev);
@@ -369,7 +369,7 @@ amr_close(dev_t dev, int flags, int fmt, struct thread *td)
/********************************************************************************
* Handle controller-specific control operations.
*/
-int
+static int
amr_ioctl(dev_t dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td)
{
struct amr_softc *sc = (struct amr_softc *)dev->si_drv1;
@@ -1300,7 +1300,7 @@ amr_releasecmd(struct amr_command *ac)
/********************************************************************************
* Allocate a new command cluster and initialise it.
*/
-void
+static void
amr_alloccmd_cluster(struct amr_softc *sc)
{
struct amr_command_cluster *acc;
@@ -1326,7 +1326,7 @@ amr_alloccmd_cluster(struct amr_softc *sc)
/********************************************************************************
* Free a command cluster
*/
-void
+static void
amr_freecmd_cluster(struct amr_command_cluster *acc)
{
struct amr_softc *sc = acc->acc_command[0].ac_sc;
diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c
index 7f06976..9d44500 100644
--- a/sys/dev/an/if_an.c
+++ b/sys/dev/an/if_an.c
@@ -700,7 +700,7 @@ an_txeof(sc, status)
* the NIC has synchronized to the current cell (either as the master
* in an ad-hoc group, or as a station connected to an access point).
*/
-void
+static void
an_stats_update(xsc)
void *xsc;
{
diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c
index b8294ab..3aebdab 100644
--- a/sys/dev/ata/atapi-cam.c
+++ b/sys/dev/ata/atapi-cam.c
@@ -489,7 +489,7 @@ atapi_poll(struct cam_sim *sim)
printf("atapi_poll called!\n");
}
-int
+static int
atapi_cb(struct atapi_request *req)
{
struct atapi_hcb *hcb = (struct atapi_hcb *) req->driver;
diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c
index e14ba84..c0be614 100644
--- a/sys/dev/bktr/bktr_core.c
+++ b/sys/dev/bktr/bktr_core.c
@@ -2298,7 +2298,7 @@ tuner_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thr
/*
* common ioctls
*/
-int
+static int
common_ioctl( bktr_ptr_t bktr, ioctl_cmd_t cmd, caddr_t arg )
{
int pixfmt;
@@ -2544,7 +2544,7 @@ dump_bt848( bktr_ptr_t bktr )
#define BKTR_TEST_RISC_STATUS_BIT2 (1 << 30)
#define BKTR_TEST_RISC_STATUS_BIT3 (1 << 31)
-bool_t notclipped (bktr_reg_t * bktr, int x, int width) {
+static bool_t notclipped (bktr_reg_t * bktr, int x, int width) {
int i;
bktr_clip_t * clip_node;
bktr->clip_start = -1;
@@ -2571,7 +2571,7 @@ bool_t notclipped (bktr_reg_t * bktr, int x, int width) {
return TRUE;
}
-bool_t getline(bktr_reg_t *bktr, int x ) {
+static bool_t getline(bktr_reg_t *bktr, int x ) {
int i, j;
bktr_clip_t * clip_node ;
diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c
index f22fcea..e26dc33 100644
--- a/sys/dev/bktr/bktr_os.c
+++ b/sys/dev/bktr/bktr_os.c
@@ -571,7 +571,7 @@ get_bktr_mem( int unit, unsigned size )
/*
*
*/
-int
+static int
bktr_open( dev_t dev, int flags, int fmt, struct thread *td )
{
bktr_ptr_t bktr;
@@ -651,7 +651,7 @@ bktr_open( dev_t dev, int flags, int fmt, struct thread *td )
/*
*
*/
-int
+static int
bktr_close( dev_t dev, int flags, int fmt, struct thread *td )
{
bktr_ptr_t bktr;
@@ -690,7 +690,7 @@ bktr_close( dev_t dev, int flags, int fmt, struct thread *td )
/*
*
*/
-int
+static int
bktr_read( dev_t dev, struct uio *uio, int ioflag )
{
bktr_ptr_t bktr;
@@ -718,7 +718,7 @@ bktr_read( dev_t dev, struct uio *uio, int ioflag )
/*
*
*/
-int
+static int
bktr_write( dev_t dev, struct uio *uio, int ioflag )
{
return( EINVAL ); /* XXX or ENXIO ? */
@@ -728,7 +728,7 @@ bktr_write( dev_t dev, struct uio *uio, int ioflag )
/*
*
*/
-int
+static int
bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td )
{
bktr_ptr_t bktr;
@@ -760,7 +760,7 @@ bktr_ioctl( dev_t dev, ioctl_cmd_t cmd, caddr_t arg, int flag, struct thread *td
/*
*
*/
-int
+static int
bktr_mmap( dev_t dev, vm_offset_t offset, int nprot )
{
int unit;
@@ -790,7 +790,8 @@ bktr_mmap( dev_t dev, vm_offset_t offset, int nprot )
return( atop(vtophys(bktr->bigbuf) + offset) );
}
-int bktr_poll( dev_t dev, int events, struct thread *td)
+static int
+bktr_poll( dev_t dev, int events, struct thread *td)
{
int unit;
bktr_ptr_t bktr;
diff --git a/sys/dev/ciss/ciss.c b/sys/dev/ciss/ciss.c
index ad4dedc..a49d7db 100644
--- a/sys/dev/ciss/ciss.c
+++ b/sys/dev/ciss/ciss.c
@@ -2479,7 +2479,7 @@ ciss_find_periph(struct ciss_softc *sc, int target)
*
* XXX is this strictly correct?
*/
-int
+static int
ciss_name_device(struct ciss_softc *sc, int target)
{
struct cam_periph *periph;
diff --git a/sys/dev/dgb/dgb.c b/sys/dev/dgb/dgb.c
index c276ed3..35a0696 100644
--- a/sys/dev/dgb/dgb.c
+++ b/sys/dev/dgb/dgb.c
@@ -2124,7 +2124,7 @@ dgbstart(tp)
#endif
}
-void
+static void
dgbstop(tp, rw)
struct tty *tp;
int rw;
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c
index 7d0f58a..57f6022 100644
--- a/sys/dev/digi/digi.c
+++ b/sys/dev/digi/digi.c
@@ -713,7 +713,7 @@ digi_disc_optim(struct tty *tp, struct termios *t, struct digi_p *port)
tp->t_state &= ~TS_CAN_BYPASS_L_RINT;
}
-int
+static int
digiopen(dev_t dev, int flag, int mode, struct thread *td)
{
struct digi_softc *sc;
@@ -878,7 +878,7 @@ out:
return (error);
}
-int
+static int
digiclose(dev_t dev, int flag, int mode, struct thread *td)
{
int mynor;
@@ -958,7 +958,7 @@ digihardclose(struct digi_p *port)
splx(s);
}
-int
+static int
digiread(dev_t dev, struct uio *uio, int flag)
{
int mynor;
@@ -984,7 +984,7 @@ digiread(dev_t dev, struct uio *uio, int flag)
return (error);
}
-int
+static int
digiwrite(dev_t dev, struct uio *uio, int flag)
{
int mynor;
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 99b355a..d68da1e 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -1431,7 +1431,7 @@ ed_probe_HP_pclanp(dev, port_rid, flags)
* HP PC Lan+ : Set the physical link to use AUI or TP/TL.
*/
-void
+static void
ed_hpp_set_physical_link(struct ed_softc *sc)
{
struct ifnet *ifp = &sc->arpcom.ac_if;
@@ -3076,7 +3076,7 @@ ed_hpp_readmem(sc, src, dst, amount)
* Only used in the probe routine to test the memory. 'len' must
* be even.
*/
-void
+static void
ed_hpp_writemem(sc, src, dst, len)
struct ed_softc *sc;
unsigned char *src;
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index 5e4d381..fae210c 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -1520,7 +1520,7 @@ fd_in(struct fdc_data *fdc, int *ptr)
#endif /* FDC_DEBUG */
}
-int
+static int
out_fdc(struct fdc_data *fdc, int x)
{
int i, j, step;
@@ -1548,7 +1548,7 @@ out_fdc(struct fdc_data *fdc, int x)
* Block device driver interface functions (interspersed with even more
* auxiliary functions).
*/
-int
+static int
Fdopen(dev_t dev, int flags, int mode, struct thread *td)
{
fdu_t fdu = FDUNIT(minor(dev));
@@ -1644,7 +1644,7 @@ Fdopen(dev_t dev, int flags, int mode, struct thread *td)
return 0;
}
-int
+static int
fdclose(dev_t dev, int flags, int mode, struct thread *td)
{
fdu_t fdu = FDUNIT(minor(dev));
@@ -1657,7 +1657,7 @@ fdclose(dev_t dev, int flags, int mode, struct thread *td)
return (0);
}
-void
+static void
fdstrategy(struct bio *bp)
{
long blknum, nblocks;
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index f229736..fb2ad57 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -1162,7 +1162,7 @@ fe_xmit (struct fe_softc *sc)
* 2) that the IFF_OACTIVE flag is checked before this code is called
* (i.e. that the output part of the interface is idle)
*/
-void
+static void
fe_start (struct ifnet *ifp)
{
struct fe_softc *sc = ifp->if_softc;
diff --git a/sys/dev/ie/if_ie.c b/sys/dev/ie/if_ie.c
index 006311f..b578b45 100644
--- a/sys/dev/ie/if_ie.c
+++ b/sys/dev/ie/if_ie.c
@@ -320,7 +320,7 @@ static struct ie_softc {
#define PORT ie_softc[unit].port
#define MEM ie_softc[unit].iomem
-int
+static int
ieprobe(struct isa_device *dvp)
{
int ret;
@@ -523,7 +523,7 @@ ee16_shutdown(void *sc, int howto)
/* Taken almost exactly from Rod's if_ix.c. */
-int
+static int
ee16_probe(struct isa_device *dvp)
{
struct ie_softc *sc = &ie_softc[dvp->id_unit];
@@ -733,7 +733,7 @@ ee16_probe(struct isa_device *dvp)
/*
* Taken almost exactly from Bill's if_is.c, then modified beyond recognition.
*/
-int
+static int
ieattach(struct isa_device *dvp)
{
int factor;
@@ -1557,7 +1557,7 @@ find_ie_mem_size(int unit)
return;
}
-void
+static void
el_reset_586(int unit)
{
outb(PORT + IE507_CTRL, EL_CTRL_RESET);
@@ -1566,13 +1566,13 @@ el_reset_586(int unit)
DELAY(100);
}
-void
+static void
sl_reset_586(int unit)
{
outb(PORT + IEATT_RESET, 0);
}
-void
+static void
ee16_reset_586(int unit)
{
outb(PORT + IEE16_ECTRL, IEE16_RESET_586);
@@ -1581,25 +1581,25 @@ ee16_reset_586(int unit)
DELAY(100);
}
-void
+static void
el_chan_attn(int unit)
{
outb(PORT + IE507_ATTN, 1);
}
-void
+static void
sl_chan_attn(int unit)
{
outb(PORT + IEATT_ATTN, 0);
}
-void
+static void
ee16_chan_attn(int unit)
{
outb(PORT + IEE16_ATTN, 0);
}
-u_short
+static u_short
ee16_read_eeprom(struct ie_softc *sc, int location)
{
int ectrl, edata;
@@ -1620,7 +1620,7 @@ ee16_read_eeprom(struct ie_softc *sc, int location)
return edata;
}
-void
+static void
ee16_eeprom_outbits(struct ie_softc *sc, int edata, int count)
{
int ectrl, i;
@@ -1642,7 +1642,7 @@ ee16_eeprom_outbits(struct ie_softc *sc, int edata, int count)
DELAY(1); /* eeprom data must be held for 0.4 uSec */
}
-int
+static int
ee16_eeprom_inbits(struct ie_softc *sc)
{
int ectrl, edata, i;
@@ -1661,7 +1661,7 @@ ee16_eeprom_inbits(struct ie_softc *sc)
return (edata);
}
-void
+static void
ee16_eeprom_clock(struct ie_softc *sc, int state)
{
int ectrl;
@@ -1683,7 +1683,7 @@ ee16_interrupt_enable(struct ie_softc *sc)
DELAY(100);
}
-void
+static void
sl_read_ether(int unit, unsigned char addr[6])
{
int i;
diff --git a/sys/dev/iir/iir.c b/sys/dev/iir/iir.c
index 4bcf27f..cb684d9 100644
--- a/sys/dev/iir/iir.c
+++ b/sys/dev/iir/iir.c
@@ -1682,7 +1682,7 @@ iir_intr(void *arg)
}
}
-int
+static int
gdt_async_event(struct gdt_softc *gdt, int service)
{
struct gdt_ccb *gccb;
@@ -1742,7 +1742,7 @@ gdt_async_event(struct gdt_softc *gdt, int service)
return (0);
}
-int
+static int
gdt_sync_event(struct gdt_softc *gdt, int service,
u_int8_t index, struct gdt_ccb *gccb)
{
diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c
index 7edc7e9..30feaf9 100644
--- a/sys/dev/lge/if_lge.c
+++ b/sys/dev/lge/if_lge.c
@@ -1054,7 +1054,7 @@ lge_rxeof(sc, cnt)
return;
}
-void
+static void
lge_rxeoc(sc)
struct lge_softc *sc;
{
diff --git a/sys/dev/mii/pnaphy.c b/sys/dev/mii/pnaphy.c
index 4a51ca3..d29d6a5 100644
--- a/sys/dev/mii/pnaphy.c
+++ b/sys/dev/mii/pnaphy.c
@@ -159,7 +159,7 @@ pnaphy_attach(dev)
return(0);
}
-int
+static int
pnaphy_service(sc, mii, cmd)
struct mii_softc *sc;
struct mii_data *mii;
diff --git a/sys/dev/mii/rlphy.c b/sys/dev/mii/rlphy.c
index fcf5538..7a18a96 100644
--- a/sys/dev/mii/rlphy.c
+++ b/sys/dev/mii/rlphy.c
@@ -250,7 +250,7 @@ rlphy_service(sc, mii, cmd)
return (0);
}
-void
+static void
rlphy_status(phy)
struct mii_softc *phy;
{
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 8659a3b..42dbd06 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -1635,7 +1635,7 @@ sioinput(com)
outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS);
}
-void
+static void
siointr(arg)
void *arg;
{
@@ -3149,7 +3149,7 @@ siocncheckc(dev)
}
-int
+static int
siocngetc(dev)
dev_t dev;
{
@@ -3176,7 +3176,7 @@ siocngetc(dev)
return (c);
}
-void
+static void
siocnputc(dev, c)
dev_t dev;
int c;
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 4673c34..51dca11 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -444,7 +444,7 @@ scdevtounit(dev_t dev)
return vty/MAXCONS;
}
-int
+static int
scopen(dev_t dev, int flag, int mode, struct thread *td)
{
int unit = scdevtounit(dev);
@@ -503,7 +503,7 @@ scopen(dev_t dev, int flag, int mode, struct thread *td)
return error;
}
-int
+static int
scclose(dev_t dev, int flag, int mode, struct thread *td)
{
struct tty *tp = dev->si_tty;
@@ -551,7 +551,7 @@ scclose(dev_t dev, int flag, int mode, struct thread *td)
return(0);
}
-int
+static int
scread(dev_t dev, struct uio *uio, int flag)
{
if (!sc_saver_keyb_only)
@@ -637,7 +637,7 @@ scparam(struct tty *tp, struct termios *t)
return 0;
}
-int
+static int
scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
{
int error;
@@ -3359,7 +3359,7 @@ next_code:
goto next_code;
}
-int
+static int
scmmap(dev_t dev, vm_offset_t offset, int nprot)
{
scr_stat *scp;
OpenPOWER on IntegriCloud