From: Sascha Wildner Date: Thu, 15 Jun 2017 17:22:44 +0000 (+0200) Subject: kernel: Add 'static' to some function definitions. X-Git-Tag: v5.1.0~472 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/8406cf706ddbb170b0137efbf9d6ea5f791388d6 kernel: Add 'static' to some function definitions. The declarations already have it, so no functional difference. --- diff --git a/sys/dev/disk/advansys/advansys.c b/sys/dev/disk/advansys/advansys.c index 5d18e563f7..bd6c01245c 100644 --- a/sys/dev/disk/advansys/advansys.c +++ b/sys/dev/disk/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/disk/ahci/ahci.c b/sys/dev/disk/ahci/ahci.c index e5ef3bb0c7..4182b17186 100644 --- a/sys/dev/disk/ahci/ahci.c +++ b/sys/dev/disk/ahci/ahci.c @@ -3690,7 +3690,7 @@ failcmd: return (ATA_S_ERROR); } -void +static void ahci_ata_cmd_done(struct ahci_ccb *ccb) { struct ata_xfer *xa = &ccb->ccb_xa; diff --git a/sys/dev/disk/amd/amd.c b/sys/dev/disk/amd/amd.c index 71d87b088d..b5acf64f18 100644 --- a/sys/dev/disk/amd/amd.c +++ b/sys/dev/disk/amd/amd.c @@ -2127,7 +2127,7 @@ amd_linkSRB(struct amd_softc *amd) } } -void +static void amd_EnDisableCE(struct amd_softc *amd, int mode, int *regval) { if (mode == ENABLE_CE) { @@ -2142,7 +2142,7 @@ amd_EnDisableCE(struct amd_softc *amd, int mode, int *regval) DELAY(160); } -void +static void amd_EEpromOutDI(struct amd_softc *amd, int *regval, int Carry) { u_int bval; diff --git a/sys/dev/disk/buslogic/bt.c b/sys/dev/disk/buslogic/bt.c index ae151199cc..8cdedb556e 100644 --- a/sys/dev/disk/buslogic/bt.c +++ b/sys/dev/disk/buslogic/bt.c @@ -1353,7 +1353,7 @@ bt_intr(void *arg) lockmgr(&bt->lock, LK_RELEASE); } -void +static void bt_intr_locked(struct bt_softc *bt) { u_int intstat; @@ -2131,7 +2131,7 @@ btpoll(struct cam_sim *sim) bt_intr_locked(cam_sim_softc(sim)); } -void +static void bttimeout(void *arg) { struct bt_ccb *bccb; diff --git a/sys/dev/disk/isp/isp_freebsd.c b/sys/dev/disk/isp/isp_freebsd.c index 45a03a2aee..ee67cd1e08 100644 --- a/sys/dev/disk/isp/isp_freebsd.c +++ b/sys/dev/disk/isp/isp_freebsd.c @@ -5731,7 +5731,7 @@ isp_common_dmateardown(ispsoftc_t *isp, struct ccb_scsiio *csio, uint32_t hdl) bus_dmamap_unload(isp->isp_osinfo.dmat, PISP_PCMD(csio)->dmap); } -void +static void isp_timer(void *arg) { ispsoftc_t *isp = arg; diff --git a/sys/dev/disk/nata/ata-chipset.c b/sys/dev/disk/nata/ata-chipset.c index 954858000b..9b8784f876 100644 --- a/sys/dev/disk/nata/ata-chipset.c +++ b/sys/dev/disk/nata/ata-chipset.c @@ -483,7 +483,7 @@ ata_ahci_ident(device_t dev) /* * AHCI v1.x compliant SATA chipset support functions */ -int +static int ata_ahci_chipinit(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); diff --git a/sys/dev/disk/nata/ata-disk.c b/sys/dev/disk/nata/ata-disk.c index 9b4c673461..07c523493e 100644 --- a/sys/dev/disk/nata/ata-disk.c +++ b/sys/dev/disk/nata/ata-disk.c @@ -445,7 +445,7 @@ ad_init(device_t dev) atadev->max_iosize = DEV_BSIZE; } -void +static void ad_describe(device_t dev) { struct ata_channel *ch = device_get_softc(device_get_parent(dev)); diff --git a/sys/dev/disk/nata/ata-dma.c b/sys/dev/disk/nata/ata-dma.c index b8d9ee51fa..cc3ecc4762 100644 --- a/sys/dev/disk/nata/ata-dma.c +++ b/sys/dev/disk/nata/ata-dma.c @@ -24,7 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.147 2007/04/08 21:53:52 sos Exp $ - * $DragonFly: src/sys/dev/disk/nata/ata-dma.c,v 1.5 2007/07/23 19:26:09 dillon Exp $ */ #include "opt_ata.h" @@ -266,7 +265,7 @@ ata_dmaload(device_t dev, caddr_t data, int32_t count, int dir, return 0; } -int +static int ata_dmaunload(device_t dev) { struct ata_channel *ch = device_get_softc(dev); diff --git a/sys/dev/disk/nata/ata-lowlevel.c b/sys/dev/disk/nata/ata-lowlevel.c index 58ddc4d560..1eeca4124a 100644 --- a/sys/dev/disk/nata/ata-lowlevel.c +++ b/sys/dev/disk/nata/ata-lowlevel.c @@ -599,7 +599,7 @@ ata_generic_reset(device_t dev) } /* must be called with ATA channel locked and state_mtx held */ -int +static int ata_generic_status(device_t dev) { struct ata_channel *ch = device_get_softc(dev); diff --git a/sys/dev/disk/ncr/ncr.c b/sys/dev/disk/ncr/ncr.c index c4b6586922..7b09a20641 100644 --- a/sys/dev/disk/ncr/ncr.c +++ b/sys/dev/disk/ncr/ncr.c @@ -2921,7 +2921,8 @@ static struct scripth scripth0 = { **========================================================== */ -void ncr_script_fill (struct script * scr, struct scripth * scrh) +static void +ncr_script_fill (struct script * scr, struct scripth * scrh) { int i; ncrcmd *p; @@ -4422,7 +4423,7 @@ ncr_action (struct cam_sim *sim, union ccb *ccb) **========================================================== */ -void +static void ncr_complete (ncb_p np, nccb_p cp) { union ccb *ccb; @@ -4592,7 +4593,7 @@ ncr_complete (ncb_p np, nccb_p cp) **========================================================== */ -void +static void ncr_wakeup (ncb_p np, u_long code) { /* @@ -4722,7 +4723,7 @@ ncr_freeze_devq (ncb_p np, struct cam_path *path) **========================================================== */ -void +static void ncr_init(ncb_p np, char * msg, u_long code) { int i; @@ -5292,7 +5293,7 @@ static void ncr_log_hard_error(ncb_p np, u_short sist, u_char dstat) **========================================================== */ -void ncr_exception (ncb_p np) +static void ncr_exception (ncb_p np) { u_char istat, dstat; u_short sist; @@ -5591,7 +5592,7 @@ void ncr_exception (ncb_p np) **---------------------------------------------------------- */ -void ncr_int_sto (ncb_p np) +static void ncr_int_sto (ncb_p np) { u_long dsa, scratcha, diff; nccb_p cp; @@ -5859,7 +5860,7 @@ static int ncr_show_msg (u_char * msg) return (1); } -void ncr_int_sir (ncb_p np) +static void ncr_int_sir (ncb_p np) { u_char scntl3; u_char chg, ofs, per, fak, wide; @@ -6467,7 +6468,7 @@ static nccb_p ncr_get_nccb **========================================================== */ -void ncr_free_nccb (ncb_p np, nccb_p cp) +static void ncr_free_nccb (ncb_p np, nccb_p cp) { /* ** sanity diff --git a/sys/dev/disk/vn/vn.c b/sys/dev/disk/vn/vn.c index 4e7740d936..0201800efc 100644 --- a/sys/dev/disk/vn/vn.c +++ b/sys/dev/disk/vn/vn.c @@ -681,7 +681,7 @@ vniocattach_swap(struct vn_softc *vn, struct vn_ioctl *vio, cdev_t dev, * to this "disk" is essentially as root. Note that credentials may change * if some other uid can write directly to the mapped file (NFS). */ -int +static int vnsetcred(struct vn_softc *vn, struct ucred *cred) { char *tmpbuf; @@ -722,7 +722,7 @@ vnsetcred(struct vn_softc *vn, struct ucred *cred) return (error); } -void +static void vnclear(struct vn_softc *vn) { IFOPT(vn, VN_FOLLOW) diff --git a/sys/dev/misc/kbdmux/kbdmux.c b/sys/dev/misc/kbdmux/kbdmux.c index 5b0652ff65..ee924765dc 100644 --- a/sys/dev/misc/kbdmux/kbdmux.c +++ b/sys/dev/misc/kbdmux/kbdmux.c @@ -152,7 +152,7 @@ kbdmux_kbd_getc(kbdmux_state_t *state) /* * Interrupt handler task */ -void +static void kbdmux_kbd_intr(void *xkbd, int pending) { keyboard_t *kbd = (keyboard_t *) xkbd; @@ -169,7 +169,7 @@ kbdmux_kbd_intr(void *xkbd, int pending) /* * Schedule interrupt handler on timeout. Called with locked state. */ -void +static void kbdmux_kbd_intr_timo(void *xkbd) { keyboard_t *kbd = (keyboard_t *) xkbd; diff --git a/sys/dev/netif/bge/if_bge.c b/sys/dev/netif/bge/if_bge.c index 45391b7dee..d14f3cbee2 100644 --- a/sys/dev/netif/bge/if_bge.c +++ b/sys/dev/netif/bge/if_bge.c @@ -5017,7 +5017,7 @@ bge_get_eaddr(struct bge_softc *sc, uint8_t eaddr[]) /* * NOTE: 'm' is not freed upon failure */ -struct mbuf * +static struct mbuf * bge_defrag_shortdma(struct mbuf *m) { struct mbuf *n; diff --git a/sys/dev/netif/bnx/if_bnx.c b/sys/dev/netif/bnx/if_bnx.c index 6008db879f..2116b761ce 100644 --- a/sys/dev/netif/bnx/if_bnx.c +++ b/sys/dev/netif/bnx/if_bnx.c @@ -4958,7 +4958,7 @@ bnx_get_eaddr(struct bnx_softc *sc, uint8_t eaddr[]) /* * NOTE: 'm' is not freed upon failure */ -struct mbuf * +static struct mbuf * bnx_defrag_shortdma(struct mbuf *m) { struct mbuf *n; diff --git a/sys/dev/netif/dc/if_dc.c b/sys/dev/netif/dc/if_dc.c index d2591cdf00..0d1ad26dbf 100644 --- a/sys/dev/netif/dc/if_dc.c +++ b/sys/dev/netif/dc/if_dc.c @@ -1042,7 +1042,7 @@ dc_crc_mask(struct dc_softc *sc) * frames. We also sneak the broadcast address into the hash filter since * we need that too. */ -void +static void dc_setfilt_21143(struct dc_softc *sc) { struct dc_desc *sframe; @@ -1114,7 +1114,7 @@ dc_setfilt_21143(struct dc_softc *sc) return; } -void +static void dc_setfilt_admtek(struct dc_softc *sc) { struct ifnet *ifp; @@ -1181,7 +1181,7 @@ dc_setfilt_admtek(struct dc_softc *sc) return; } -void +static void dc_setfilt_asix(struct dc_softc *sc) { struct ifnet *ifp; @@ -1254,7 +1254,7 @@ dc_setfilt_asix(struct dc_softc *sc) return; } -void +static void dc_setfilt_xircom(struct dc_softc *sc) { struct dc_desc *sframe; diff --git a/sys/dev/netif/em/if_em.c b/sys/dev/netif/em/if_em.c index 71105f8781..ffd8663e94 100644 --- a/sys/dev/netif/em/if_em.c +++ b/sys/dev/netif/em/if_em.c @@ -3813,7 +3813,7 @@ em_is_valid_eaddr(const uint8_t *addr) /* * Enable PCI Wake On Lan capability */ -void +static void em_enable_wol(device_t dev) { uint16_t cap, status; diff --git a/sys/dev/netif/emx/if_emx.c b/sys/dev/netif/emx/if_emx.c index 397fb874d7..3474967eeb 100644 --- a/sys/dev/netif/emx/if_emx.c +++ b/sys/dev/netif/emx/if_emx.c @@ -3404,7 +3404,7 @@ emx_is_valid_eaddr(const uint8_t *addr) /* * Enable PCI Wake On Lan capability */ -void +static void emx_enable_wol(device_t dev) { uint16_t cap, status; diff --git a/sys/dev/netif/mii_layer/mii.c b/sys/dev/netif/mii_layer/mii.c index 29221095fe..592edcf298 100644 --- a/sys/dev/netif/mii_layer/mii.c +++ b/sys/dev/netif/mii_layer/mii.c @@ -120,7 +120,7 @@ miibus_no_phy(device_t dev, const struct mii_probe_args *args, int phyno) * to the network interface driver parent. */ -int +static int miibus_probe(device_t dev) { struct mii_attach_args ma, *args; @@ -167,7 +167,7 @@ miibus_probe(device_t dev) return 0; } -int +static int miibus_attach(device_t dev) { const struct mii_probe_args *probe_args; @@ -184,7 +184,7 @@ miibus_attach(device_t dev) return 0; } -int +static int miibus_detach(device_t dev) { struct mii_data *mii; diff --git a/sys/dev/netif/mii_layer/nsgphy.c b/sys/dev/netif/mii_layer/nsgphy.c index 017f5bf667..fe5197378b 100644 --- a/sys/dev/netif/mii_layer/nsgphy.c +++ b/sys/dev/netif/mii_layer/nsgphy.c @@ -167,7 +167,7 @@ nsgphy_attach(device_t dev) return(0); } -int +static int nsgphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) { struct ifmedia_entry *ife = mii->mii_media.ifm_cur; diff --git a/sys/dev/netif/mii_layer/tlphy.c b/sys/dev/netif/mii_layer/tlphy.c index 17c4e60190..9de792b657 100644 --- a/sys/dev/netif/mii_layer/tlphy.c +++ b/sys/dev/netif/mii_layer/tlphy.c @@ -407,7 +407,7 @@ tlphy_auto(struct tlphy_softc *sc, int waitfor) return (error); } -void +static void tlphy_acomp(struct tlphy_softc *sc) { int aner, anlpar; diff --git a/sys/dev/netif/mii_layer/xmphy.c b/sys/dev/netif/mii_layer/xmphy.c index 5dc3b7771b..94a5d0471d 100644 --- a/sys/dev/netif/mii_layer/xmphy.c +++ b/sys/dev/netif/mii_layer/xmphy.c @@ -156,7 +156,7 @@ xmphy_attach(device_t dev) return(0); } -int +static int xmphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) { struct ifmedia_entry *ife = mii->mii_media.ifm_cur; @@ -270,7 +270,7 @@ xmphy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) return (0); } -void +static void xmphy_status(struct mii_softc *sc) { struct mii_data *mii = sc->mii_pdata; diff --git a/sys/dev/netif/ndis/if_ndis.c b/sys/dev/netif/ndis/if_ndis.c index 033dff72b7..8df000fd96 100644 --- a/sys/dev/netif/ndis/if_ndis.c +++ b/sys/dev/netif/ndis/if_ndis.c @@ -3115,7 +3115,7 @@ ndis_80211ioctl(struct ieee80211com *ic, u_long cmd, void *data) return (error); } -int +static int ndis_del_key(struct ieee80211vap *vap, const struct ieee80211_key *key) { struct ndis_softc *sc = vap->iv_ic->ic_softc; diff --git a/sys/dev/netif/pcn/if_pcn.c b/sys/dev/netif/pcn/if_pcn.c index ffddea978a..702a5b533f 100644 --- a/sys/dev/netif/pcn/if_pcn.c +++ b/sys/dev/netif/pcn/if_pcn.c @@ -1069,7 +1069,7 @@ again: ifp->if_timer = 5; } -void +static void pcn_setfilt(struct ifnet *ifp) { struct pcn_softc *sc; diff --git a/sys/dev/netif/ral/rt2661.c b/sys/dev/netif/ral/rt2661.c index 15f1da5134..e7b3f4e5a1 100644 --- a/sys/dev/netif/ral/rt2661.c +++ b/sys/dev/netif/ral/rt2661.c @@ -2463,7 +2463,7 @@ rt2661_init(void *priv) ieee80211_start_all(ic); /* start all vap's */ } -void +static void rt2661_stop_locked(struct rt2661_softc *sc) { volatile int *flags = &sc->sc_flags; @@ -2512,7 +2512,7 @@ rt2661_stop_locked(struct rt2661_softc *sc) } } -void +static void rt2661_stop(void *priv) { struct rt2661_softc *sc = priv; diff --git a/sys/dev/netif/sk/if_sk.c b/sys/dev/netif/sk/if_sk.c index f961eb9bc2..24c9fff8e8 100644 --- a/sys/dev/netif/sk/if_sk.c +++ b/sys/dev/netif/sk/if_sk.c @@ -867,7 +867,7 @@ sk_newbuf_std(struct sk_if_softc *sc_if, int idx, int wait) /* * Allocate a jumbo buffer. */ -struct sk_jpool_entry * +static struct sk_jpool_entry * sk_jalloc(struct sk_if_softc *sc_if) { struct sk_chain_data *cd = &sc_if->sk_cdata; @@ -890,7 +890,7 @@ sk_jalloc(struct sk_if_softc *sc_if) /* * Release a jumbo buffer. */ -void +static void sk_jfree(void *arg) { struct sk_jpool_entry *entry = arg; diff --git a/sys/dev/raid/amr/amr.c b/sys/dev/raid/amr/amr.c index 00a68b3384..ad384ad1c8 100644 --- a/sys/dev/raid/amr/amr.c +++ b/sys/dev/raid/amr/amr.c @@ -509,7 +509,7 @@ amr_ioctl_buffer_length(unsigned long len) return (len); } -int +static int amr_linux_ioctl_int(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct sysmsg *sm) { diff --git a/sys/dev/raid/arcmsr/arcmsr.c b/sys/dev/raid/arcmsr/arcmsr.c index 282c06eb91..1ee503632f 100644 --- a/sys/dev/raid/arcmsr/arcmsr.c +++ b/sys/dev/raid/arcmsr/arcmsr.c @@ -2152,7 +2152,7 @@ static void arcmsr_iop_parking(struct AdapterControlBlock *acb) ** ************************************************************************ */ -u_int32_t arcmsr_iop_ioctlcmd(struct AdapterControlBlock *acb, u_int32_t ioctl_cmd, caddr_t arg) +static u_int32_t arcmsr_iop_ioctlcmd(struct AdapterControlBlock *acb, u_int32_t ioctl_cmd, caddr_t arg) { struct CMD_MESSAGE_FIELD *pcmdmessagefld; u_int32_t retvalue = EINVAL; @@ -2340,7 +2340,7 @@ static void arcmsr_free_srb(struct CommandControlBlock *srb) ************************************************************************** ************************************************************************** */ -struct CommandControlBlock *arcmsr_get_freesrb(struct AdapterControlBlock *acb) +static struct CommandControlBlock *arcmsr_get_freesrb(struct AdapterControlBlock *acb) { struct CommandControlBlock *srb = NULL; u_int32_t workingsrb_startindex, workingsrb_doneindex; diff --git a/sys/dev/raid/hptmv/entry.c b/sys/dev/raid/hptmv/entry.c index 2dcf8df588..6619906026 100644 --- a/sys/dev/raid/hptmv/entry.c +++ b/sys/dev/raid/hptmv/entry.c @@ -2240,7 +2240,7 @@ ccb_done(union ccb *ccb) * ccb - Pointer to SCSI command structure. ****************************************************************/ -void +static void hpt_action(struct cam_sim *sim, union ccb *ccb) { IAL_ADAPTER_T * pAdapter = (IAL_ADAPTER_T *) cam_sim_softc(sim); @@ -2505,7 +2505,7 @@ launch_worker_thread(void) /********************************************************************************/ -int HPTLIBAPI fOsBuildSgl(_VBUS_ARG PCommand pCmd, FPSCAT_GATH pSg, int logical) +static int HPTLIBAPI fOsBuildSgl(_VBUS_ARG PCommand pCmd, FPSCAT_GATH pSg, int logical) { union ccb *ccb = (union ccb *)pCmd->pOrgCommand; bus_dma_segment_t *sgList = (bus_dma_segment_t *)ccb->csio.data_ptr; diff --git a/sys/dev/raid/hptmv/gui_lib.c b/sys/dev/raid/hptmv/gui_lib.c index 93513fd24a..3e5baf5565 100644 --- a/sys/dev/raid/hptmv/gui_lib.c +++ b/sys/dev/raid/hptmv/gui_lib.c @@ -353,7 +353,7 @@ static int get_disk_info(PVDevice pVDevice, PDEVICE_INFO pDiskInfo) return 0; } -int hpt_get_driver_capabilities(PDRIVER_CAPABILITIES cap) +static int hpt_get_driver_capabilities(PDRIVER_CAPABILITIES cap) { ZeroMemory(cap, sizeof(DRIVER_CAPABILITIES)); cap->dwSize = sizeof(DRIVER_CAPABILITIES); @@ -398,7 +398,7 @@ int hpt_get_driver_capabilities(PDRIVER_CAPABILITIES cap) return 0; } -int hpt_get_controller_count(void) +static int hpt_get_controller_count(void) { IAL_ADAPTER_T *pAdapTemp = gIal_Adapter; int iControllerCount = 0; @@ -412,7 +412,7 @@ int hpt_get_controller_count(void) return iControllerCount; } -int hpt_get_controller_info(int id, PCONTROLLER_INFO pInfo) +static int hpt_get_controller_info(int id, PCONTROLLER_INFO pInfo) { IAL_ADAPTER_T *pAdapTemp; int iControllerCount = 0; @@ -443,7 +443,7 @@ int hpt_get_controller_info(int id, PCONTROLLER_INFO pInfo) } -int hpt_get_channel_info(int id, int bus, PCHANNEL_INFO pInfo) +static int hpt_get_channel_info(int id, int bus, PCHANNEL_INFO pInfo) { IAL_ADAPTER_T *pAdapTemp = gIal_Adapter; int i,iControllerCount = 0; @@ -476,7 +476,7 @@ found: } -int hpt_get_logical_devices(DEVICEID * pIds, int nMaxCount) +static int hpt_get_logical_devices(DEVICEID * pIds, int nMaxCount) { int count = 0; int i,j; @@ -509,7 +509,7 @@ done: return count; } -int hpt_get_device_info(DEVICEID id, PLOGICAL_DEVICE_INFO pInfo) +static int hpt_get_device_info(DEVICEID id, PLOGICAL_DEVICE_INFO pInfo) { PVDevice pVDevice = ID_TO_VDEV(id); @@ -533,7 +533,7 @@ int hpt_get_device_info(DEVICEID id, PLOGICAL_DEVICE_INFO pInfo) return get_disk_info(pVDevice, &pInfo->u.device); } -int hpt_get_device_info_v2(DEVICEID id, PLOGICAL_DEVICE_INFO_V2 pInfo) +static int hpt_get_device_info_v2(DEVICEID id, PLOGICAL_DEVICE_INFO_V2 pInfo) { PVDevice pVDevice = ID_TO_VDEV(id); @@ -560,7 +560,7 @@ int hpt_get_device_info_v2(DEVICEID id, PLOGICAL_DEVICE_INFO_V2 pInfo) } #ifdef SUPPORT_ARRAY -DEVICEID hpt_create_array_v2(_VBUS_ARG PCREATE_ARRAY_PARAMS_V2 pParam) +static DEVICEID hpt_create_array_v2(_VBUS_ARG PCREATE_ARRAY_PARAMS_V2 pParam) { ULONG Stamp = GetStamp(); int i,j; @@ -810,7 +810,7 @@ error: return INVALID_DEVICEID; } -DEVICEID hpt_create_array(_VBUS_ARG PCREATE_ARRAY_PARAMS pParam) +static DEVICEID hpt_create_array(_VBUS_ARG PCREATE_ARRAY_PARAMS pParam) { CREATE_ARRAY_PARAMS_V2 param2; param2.ArrayType = pParam->ArrayType; @@ -981,7 +981,7 @@ find: return 0; } -int hpt_add_spare_disk(_VBUS_ARG DEVICEID idDisk) +static int hpt_add_spare_disk(_VBUS_ARG DEVICEID idDisk) { PVDevice pVDevice = ID_TO_VDEV(idDisk); DECLARE_BUFFER(PUCHAR, pbuffer); @@ -1002,7 +1002,7 @@ int hpt_add_spare_disk(_VBUS_ARG DEVICEID idDisk) return 0; } -int hpt_remove_spare_disk(_VBUS_ARG DEVICEID idDisk) +static int hpt_remove_spare_disk(_VBUS_ARG DEVICEID idDisk) { PVDevice pVDevice = ID_TO_VDEV(idDisk); @@ -1017,7 +1017,7 @@ int hpt_remove_spare_disk(_VBUS_ARG DEVICEID idDisk) return 0; } -int hpt_set_array_info(_VBUS_ARG DEVICEID idArray, PALTERABLE_ARRAY_INFO pInfo) +static int hpt_set_array_info(_VBUS_ARG DEVICEID idArray, PALTERABLE_ARRAY_INFO pInfo) { PVDevice pVDevice = ID_TO_VDEV(idArray); diff --git a/sys/dev/raid/hptmv/ioctl.c b/sys/dev/raid/hptmv/ioctl.c index 80aa9d18a8..906055557e 100644 --- a/sys/dev/raid/hptmv/ioctl.c +++ b/sys/dev/raid/hptmv/ioctl.c @@ -188,7 +188,7 @@ hpt_delete_array(_VBUS_ARG DEVICEID id, DWORD options) /* just to prevent driver from sending more commands */ static void HPTLIBAPI nothing(_VBUS_ARG void *notused){} -void +static void lock_driver_idle(IAL_ADAPTER_T *pAdapter) { _VBUS_INST(&pAdapter->VBus) @@ -616,7 +616,7 @@ hpt_set_array_state(DEVICEID idArray, DWORD state) return 0; } -int HPTLIBAPI +static int HPTLIBAPI R1ControlSgl(_VBUS_ARG PCommand pCmd, FPSCAT_GATH pSgTable, int logical) { ULONG bufferSize = SECTOR_TO_BYTE(pCmd->uCmd.R1Control.nSectors); @@ -680,7 +680,7 @@ R1ControlSgl(_VBUS_ARG PCommand pCmd, FPSCAT_GATH pSgTable, int logical) } static int End_Job=0; -void HPTLIBAPI +static void HPTLIBAPI thread_io_done(_VBUS_ARG PCommand pCmd) { End_Job = 1; diff --git a/sys/dev/raid/iir/iir.c b/sys/dev/raid/iir/iir.c index 4557e034d8..a787918c81 100644 --- a/sys/dev/raid/iir/iir.c +++ b/sys/dev/raid/iir/iir.c @@ -1647,7 +1647,7 @@ iir_intr(void *arg) } } -int +static int gdt_async_event(struct gdt_softc *gdt, int service) { struct gdt_ccb *gccb; @@ -1706,7 +1706,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/raid/twa/tw_osl_cam.c b/sys/dev/raid/twa/tw_osl_cam.c index 5fae861981..73cb90079b 100644 --- a/sys/dev/raid/twa/tw_osl_cam.c +++ b/sys/dev/raid/twa/tw_osl_cam.c @@ -209,7 +209,7 @@ tw_osli_cam_detach(struct twa_softc *sc) * Return value: 0 -- success * non-zero-- failure */ -TW_INT32 +static TW_INT32 tw_osli_execute_scsi(struct tw_osli_req_context *req, union ccb *ccb) { struct twa_softc *sc = req->ctlr; @@ -353,7 +353,7 @@ tw_osli_execute_scsi(struct tw_osli_req_context *req, union ccb *ccb) * Output: None * Return value: None */ -TW_VOID +static TW_VOID twa_action(struct cam_sim *sim, union ccb *ccb) { struct twa_softc *sc = (struct twa_softc *)cam_sim_softc(sim); @@ -502,7 +502,7 @@ twa_action(struct cam_sim *sim, union ccb *ccb) * Output: None * Return value: None */ -TW_VOID +static TW_VOID twa_poll(struct cam_sim *sim) { struct twa_softc *sc = (struct twa_softc *)(cam_sim_softc(sim)); diff --git a/sys/dev/raid/tws/tws.c b/sys/dev/raid/tws/tws.c index a7fb718c38..e0a405e594 100644 --- a/sys/dev/raid/tws/tws.c +++ b/sys/dev/raid/tws/tws.c @@ -106,7 +106,7 @@ static struct dev_ops tws_ops = { * attach routine when we create the /dev entry. */ -int +static int tws_open(struct dev_open_args *ap) { cdev_t dev = ap->a_head.a_dev; @@ -117,7 +117,7 @@ tws_open(struct dev_open_args *ap) return (0); } -int +static int tws_close(struct dev_close_args *ap) { cdev_t dev = ap->a_head.a_dev; @@ -128,7 +128,7 @@ tws_close(struct dev_close_args *ap) return (0); } -int +static int tws_read(struct dev_read_args *ap) { cdev_t dev = ap->a_head.a_dev; @@ -139,7 +139,7 @@ tws_read(struct dev_read_args *ap) return (0); } -int +static int tws_write(struct dev_write_args *ap) { cdev_t dev = ap->a_head.a_dev; diff --git a/sys/dev/raid/tws/tws_cam.c b/sys/dev/raid/tws/tws_cam.c index 5414a2f55a..5f40965573 100644 --- a/sys/dev/raid/tws/tws_cam.c +++ b/sys/dev/raid/tws/tws_cam.c @@ -1183,7 +1183,7 @@ tws_poll(struct cam_sim *sim) tws_intr(sc); } -void +static void tws_timeout(void *arg) { struct tws_request *req = (struct tws_request *)arg; diff --git a/sys/dev/raid/vinum/vinum.c b/sys/dev/raid/vinum/vinum.c index 48d0559a85..4adc7bdc4c 100644 --- a/sys/dev/raid/vinum/vinum.c +++ b/sys/dev/raid/vinum/vinum.c @@ -85,7 +85,7 @@ cdev_t vinum_daemon_dev; * to do is allocate enough space for devices to be configured later, and * add devsw entries. */ -void +static void vinumattach(void *dummy) { char *cp, *cp1, *cp2, **drives; diff --git a/sys/dev/raid/vinum/vinumio.c b/sys/dev/raid/vinum/vinumio.c index 49669f5a82..02feeee9a9 100644 --- a/sys/dev/raid/vinum/vinumio.c +++ b/sys/dev/raid/vinum/vinumio.c @@ -841,7 +841,7 @@ vinum_scandisk(char *devicename[], int drives) * Return 1 if a < b, 0 if a == b, 01 if a > b: in other * words, sort backwards. */ -int +static int drivecmp(const void *va, const void *vb) { const struct drive *a = &DRIVE[*(const int *) va]; diff --git a/sys/dev/serial/rp/rp.c b/sys/dev/serial/rp/rp.c index 10b978496a..252ade41d5 100644 --- a/sys/dev/serial/rp/rp.c +++ b/sys/dev/serial/rp/rp.c @@ -935,7 +935,7 @@ rp_releaseresource(CONTROLLER_t *ctlp) lwkt_reltoken(&tty_token); } -int +static int rpopen(struct dev_open_args *ap) { cdev_t dev = ap->a_head.a_dev; @@ -1103,7 +1103,7 @@ out2: return(error); } -int +static int rpclose(struct dev_close_args *ap) { cdev_t dev = ap->a_head.a_dev; @@ -1225,7 +1225,7 @@ rpdtrwakeup(void *chan) lwkt_reltoken(&tty_token); } -int +static int rpioctl(struct dev_ioctl_args *ap) { cdev_t dev = ap->a_head.a_dev; diff --git a/sys/dev/serial/rp/rp_pci.c b/sys/dev/serial/rp/rp_pci.c index 663f0387a2..4ede457d2d 100644 --- a/sys/dev/serial/rp/rp_pci.c +++ b/sys/dev/serial/rp/rp_pci.c @@ -279,7 +279,7 @@ rp_pci_aiop2off(int aiop, int offset) } /* Read the int status for a PCI controller. */ -unsigned char +static unsigned char rp_pci_ctlmask(CONTROLLER_t *ctlp) { return sPCIGetControllerIntStatus(ctlp); diff --git a/sys/dev/serial/si/si_drv.c b/sys/dev/serial/si/si_drv.c index 0129a23218..3cd6e2e563 100644 --- a/sys/dev/serial/si/si_drv.c +++ b/sys/dev/serial/si/si_drv.c @@ -2047,7 +2047,7 @@ si_lstart(void *arg) /* * Stop output on a line. called at spltty(); */ -void +static void si_stop(struct tty *tp, int rw) { volatile struct si_channel *ccbp; diff --git a/sys/dev/serial/sio/sio.c b/sys/dev/serial/sio/sio.c index 5adc987aac..b6ffa34e74 100644 --- a/sys/dev/serial/sio/sio.c +++ b/sys/dev/serial/sio/sio.c @@ -1732,7 +1732,7 @@ sioinput(struct com_s *com) outb(com->modem_ctl_port, com->mcr_image |= MCR_RTS); } -void +static void siointr(void *arg) { lwkt_gettoken(&tty_token); @@ -3143,7 +3143,7 @@ siocncheckc(void *private) } -int +static int siocngetc(void *private) { int c; @@ -3173,7 +3173,7 @@ siocngetc(void *private) return (c); } -void +static void siocnputc(void *private, int c) { int unit = (int)(intptr_t)private; diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index e407d5ebd3..e037eee65e 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -1018,7 +1018,7 @@ es1370_init(struct es_info *es) } /* ES1371 specific */ -int +static int es1371_init(struct es_info *es) { uint32_t cssr, devid, revid, subdev; diff --git a/sys/dev/video/cxm/cxm.c b/sys/dev/video/cxm/cxm.c index d3b2cd8e32..899f34a091 100644 --- a/sys/dev/video/cxm/cxm.c +++ b/sys/dev/video/cxm/cxm.c @@ -2139,7 +2139,7 @@ cxm_write_ivar(device_t dev, device_t child, int index, uintptr_t val) /* * */ -int +static int cxm_open(struct dev_open_args *ap) { cdev_t dev = ap->a_head.a_dev; @@ -2171,7 +2171,7 @@ cxm_open(struct dev_open_args *ap) /* * */ -int +static int cxm_close(struct dev_close_args *ap) { cdev_t dev = ap->a_head.a_dev; @@ -2208,7 +2208,7 @@ cxm_close(struct dev_close_args *ap) /* * */ -int +static int cxm_read(struct dev_read_args *ap) { cdev_t dev = ap->a_head.a_dev; @@ -2302,7 +2302,7 @@ cxm_read(struct dev_read_args *ap) /* * */ -int +static int cxm_ioctl(struct dev_ioctl_args *ap) { cdev_t dev = ap->a_head.a_dev; diff --git a/sys/emulation/ndis/subr_ntoskrnl.c b/sys/emulation/ndis/subr_ntoskrnl.c index a149bba5b7..71e664e0a3 100644 --- a/sys/emulation/ndis/subr_ntoskrnl.c +++ b/sys/emulation/ndis/subr_ntoskrnl.c @@ -2913,7 +2913,7 @@ RtlInitUnicodeString(unicode_string *dst, uint16_t *src) } } -ndis_status +static ndis_status RtlUnicodeStringToInteger(unicode_string *ustr, uint32_t base, uint32_t *val) { uint16_t *uchr; diff --git a/sys/gnu/vfs/ext2fs/ext2_vfsops.c b/sys/gnu/vfs/ext2fs/ext2_vfsops.c index fa117d5954..2ade02f52b 100644 --- a/sys/gnu/vfs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/vfs/ext2fs/ext2_vfsops.c @@ -239,7 +239,7 @@ ext2_quotactl(struct mount *mp, int cmds, uid_t uid, caddr_t arg, /* * Initial UFS filesystems, done only once. */ -int +static int ext2_init(struct vfsconf *vfsp) { static int done; diff --git a/sys/netgraph/frame_relay/ng_frame_relay.c b/sys/netgraph/frame_relay/ng_frame_relay.c index 78934480e7..ef74f64ffb 100644 --- a/sys/netgraph/frame_relay/ng_frame_relay.c +++ b/sys/netgraph/frame_relay/ng_frame_relay.c @@ -319,7 +319,7 @@ ngfrm_newhook(node_p node, hook_p hook, const char *name) /* * Count up the size of the address header if we don't already know */ -int +static int ngfrm_addrlen(char *hdr) { if (hdr[0] & BYTEX_EA) diff --git a/sys/netproto/smb/smb_conn.c b/sys/netproto/smb/smb_conn.c index ab301e4bba..a5f69bf677 100644 --- a/sys/netproto/smb/smb_conn.c +++ b/sys/netproto/smb/smb_conn.c @@ -30,7 +30,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netsmb/smb_conn.c,v 1.1.2.1 2001/05/22 08:32:33 bp Exp $ - * $DragonFly: src/sys/netproto/smb/smb_conn.c,v 1.20 2006/12/20 18:14:44 dillon Exp $ */ /* @@ -268,7 +267,7 @@ smb_co_gone(struct smb_connobj *cp, struct smb_cred *scred) cp->co_free(cp); } -void +static void smb_co_ref(struct smb_connobj *cp) { SMB_CO_LOCK(cp); @@ -276,7 +275,7 @@ smb_co_ref(struct smb_connobj *cp) SMB_CO_UNLOCK(cp); } -void +static void smb_co_rele(struct smb_connobj *cp, struct smb_cred *scred) { SMB_CO_LOCK(cp); @@ -302,7 +301,7 @@ smb_co_rele(struct smb_connobj *cp, struct smb_cred *scred) } } -int +static int smb_co_get(struct smb_connobj *cp, int flags, struct smb_cred *scred) { int error; @@ -335,7 +334,7 @@ smb_co_get(struct smb_connobj *cp, int flags, struct smb_cred *scred) return 0; } -void +static void smb_co_put(struct smb_connobj *cp, struct smb_cred *scred) { SMB_CO_LOCK(cp); @@ -364,13 +363,13 @@ smb_co_put(struct smb_connobj *cp, struct smb_cred *scred) } } -int +static int smb_co_lockstatus(struct smb_connobj *cp, struct thread *td) { return lockstatus(&cp->co_lock, td); } -int +static int smb_co_lock(struct smb_connobj *cp, int flags) { int error; @@ -393,7 +392,7 @@ smb_co_lock(struct smb_connobj *cp, int flags) return (error); } -void +static void smb_co_unlock(struct smb_connobj *cp, int flags) { lockmgr(&cp->co_lock, flags | LK_RELEASE); @@ -676,7 +675,7 @@ smb_vc_connect(struct smb_vc *vcp, struct smb_cred *scred) * Destroy VC to server, invalidate shares linked with it. * Transport should be locked on entry. */ -int +static int smb_vc_disconnect(struct smb_vc *vcp) { diff --git a/sys/netproto/smb/smb_iod.c b/sys/netproto/smb/smb_iod.c index ebc6f9c3c5..ccef727579 100644 --- a/sys/netproto/smb/smb_iod.c +++ b/sys/netproto/smb/smb_iod.c @@ -661,7 +661,7 @@ smb_iod_main(struct smbiod *iod) #define kthread_create_compat smb_kthread_create #define kthread_exit_compat smb_kthread_exit -void +static void smb_iod_thread(void *arg) { struct smbiod *iod = arg;