Date: Sat, 13 Jun 2009 04:56:45 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r194099 - in head/sys/dev/usb: . input serial storage wlan Message-ID: <200906130456.n5D4uj5w003374@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: thompsa Date: Sat Jun 13 04:56:45 2009 New Revision: 194099 URL: http://svn.freebsd.org/changeset/base/194099 Log: Make variables static where appropriate. Found by: cscout Modified: head/sys/dev/usb/input/ukbd.c head/sys/dev/usb/serial/uchcom.c head/sys/dev/usb/serial/ufoma.c head/sys/dev/usb/serial/uplcom.c head/sys/dev/usb/serial/uslcom.c head/sys/dev/usb/storage/umass.c head/sys/dev/usb/storage/ustorage_fs.c head/sys/dev/usb/usb_dev.c head/sys/dev/usb/wlan/if_urtw.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Sat Jun 13 01:23:34 2009 (r194098) +++ head/sys/dev/usb/input/ukbd.c Sat Jun 13 04:56:45 2009 (r194099) @@ -1562,7 +1562,7 @@ ukbd_key2scan(struct ukbd_softc *sc, int #endif /* UKBD_EMULATE_ATSCANCODE */ -keyboard_switch_t ukbdsw = { +static keyboard_switch_t ukbdsw = { .probe = &ukbd__probe, .init = &ukbd_init, .term = &ukbd_term, Modified: head/sys/dev/usb/serial/uchcom.c ============================================================================== --- head/sys/dev/usb/serial/uchcom.c Sat Jun 13 01:23:34 2009 (r194098) +++ head/sys/dev/usb/serial/uchcom.c Sat Jun 13 04:56:45 2009 (r194099) @@ -257,7 +257,7 @@ static const struct usb_config uchcom_co }, }; -struct ucom_callback uchcom_callback = { +static struct ucom_callback uchcom_callback = { .usb2_com_cfg_get_status = &uchcom_cfg_get_status, .usb2_com_cfg_set_dtr = &uchcom_cfg_set_dtr, .usb2_com_cfg_set_rts = &uchcom_cfg_set_rts, Modified: head/sys/dev/usb/serial/ufoma.c ============================================================================== --- head/sys/dev/usb/serial/ufoma.c Sat Jun 13 01:23:34 2009 (r194098) +++ head/sys/dev/usb/serial/ufoma.c Sat Jun 13 04:56:45 2009 (r194099) @@ -1103,7 +1103,7 @@ ufoma_stop_write(struct ucom_softc *ucom } } -struct umcpc_modetostr_tab{ +static struct umcpc_modetostr_tab{ int mode; char *str; }umcpc_modetostr_tab[]={ Modified: head/sys/dev/usb/serial/uplcom.c ============================================================================== --- head/sys/dev/usb/serial/uplcom.c Sat Jun 13 01:23:34 2009 (r194098) +++ head/sys/dev/usb/serial/uplcom.c Sat Jun 13 04:56:45 2009 (r194099) @@ -214,7 +214,7 @@ static const struct usb_config uplcom_co }, }; -struct ucom_callback uplcom_callback = { +static struct ucom_callback uplcom_callback = { .usb2_com_cfg_get_status = &uplcom_cfg_get_status, .usb2_com_cfg_set_dtr = &uplcom_cfg_set_dtr, .usb2_com_cfg_set_rts = &uplcom_cfg_set_rts, Modified: head/sys/dev/usb/serial/uslcom.c ============================================================================== --- head/sys/dev/usb/serial/uslcom.c Sat Jun 13 01:23:34 2009 (r194098) +++ head/sys/dev/usb/serial/uslcom.c Sat Jun 13 04:56:45 2009 (r194099) @@ -143,7 +143,7 @@ static const struct usb_config uslcom_co }, }; -struct ucom_callback uslcom_callback = { +static struct ucom_callback uslcom_callback = { .usb2_com_cfg_open = &uslcom_open, .usb2_com_cfg_close = &uslcom_close, .usb2_com_cfg_get_status = &uslcom_get_status, Modified: head/sys/dev/usb/storage/umass.c ============================================================================== --- head/sys/dev/usb/storage/umass.c Sat Jun 13 01:23:34 2009 (r194098) +++ head/sys/dev/usb/storage/umass.c Sat Jun 13 04:56:45 2009 (r194099) @@ -1074,7 +1074,7 @@ static void umass_dump_buffer(struct uma uint32_t); #endif -struct usb_config umass_bbb_config[UMASS_T_BBB_MAX] = { +static struct usb_config umass_bbb_config[UMASS_T_BBB_MAX] = { [UMASS_T_BBB_RESET1] = { .type = UE_CONTROL, @@ -1164,7 +1164,7 @@ struct usb_config umass_bbb_config[UMASS }, }; -struct usb_config umass_cbi_config[UMASS_T_CBI_MAX] = { +static struct usb_config umass_cbi_config[UMASS_T_CBI_MAX] = { [UMASS_T_CBI_RESET1] = { .type = UE_CONTROL, Modified: head/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- head/sys/dev/usb/storage/ustorage_fs.c Sat Jun 13 01:23:34 2009 (r194098) +++ head/sys/dev/usb/storage/ustorage_fs.c Sat Jun 13 04:56:45 2009 (r194099) @@ -254,7 +254,7 @@ DRIVER_MODULE(ustorage_fs, uhub, ustorag MODULE_VERSION(ustorage_fs, 0); MODULE_DEPEND(ustorage_fs, usb, 1, 1, 1); -struct usb_config ustorage_fs_bbb_config[USTORAGE_FS_T_BBB_MAX] = { +static struct usb_config ustorage_fs_bbb_config[USTORAGE_FS_T_BBB_MAX] = { [USTORAGE_FS_T_BBB_COMMAND] = { .type = UE_BULK, Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Sat Jun 13 01:23:34 2009 (r194098) +++ head/sys/dev/usb/usb_dev.c Sat Jun 13 04:56:45 2009 (r194099) @@ -120,7 +120,7 @@ struct cdevsw usb2_devsw = { static struct cdev* usb2_dev = NULL; /* character device structure used for /dev/usb */ -struct cdevsw usb2_static_devsw = { +static struct cdevsw usb2_static_devsw = { .d_version = D_VERSION, .d_ioctl = usb2_static_ioctl, .d_name = "usb" Modified: head/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtw.c Sat Jun 13 01:23:34 2009 (r194098) +++ head/sys/dev/usb/wlan/if_urtw.c Sat Jun 13 04:56:45 2009 (r194099) @@ -93,7 +93,7 @@ enum { (void) sc; \ } while (0) #endif -int urtw_preamble_mode = URTW_PREAMBLE_MODE_LONG; +static int urtw_preamble_mode = URTW_PREAMBLE_MODE_LONG; SYSCTL_INT(_hw_usb_urtw, OID_AUTO, preamble_mode, CTLFLAG_RW, &urtw_preamble_mode, 0, "set the preable mode (long or short)"); TUNABLE_INT("hw.usb.urtw.preamble_mode", &urtw_preamble_mode);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906130456.n5D4uj5w003374>