Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: most: mostcore/core.c. Fix "missing static keyword" warnings

This is a patch to the mostcore/core.c file. It makes
several local functions and structures static to prevent global
visibility.

Signed-off-by: Adrian Remonda <adrianremonda@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Adrian Remonda and committed by
Greg Kroah-Hartman
c942ea7a ddb98ce1

+8 -7
+8 -7
drivers/staging/most/mostcore/core.c
··· 178 178 * flush_channel_fifos - clear the channel fifos 179 179 * @c: pointer to channel object 180 180 */ 181 - void flush_channel_fifos(struct most_c_obj *c) 181 + static void flush_channel_fifos(struct most_c_obj *c) 182 182 { 183 183 unsigned long flags, hf_flags; 184 184 struct mbo *mbo, *tmp; ··· 888 888 * Input: "mdev0:ch0@ep_81" 889 889 * Output: *a -> "mdev0", *b -> "ch0@ep_81", *c == NULL 890 890 */ 891 - int split_string(char *buf, char **a, char **b, char **c) 891 + static int split_string(char *buf, char **a, char **b, char **c) 892 892 { 893 893 *a = strsep(&buf, ":"); 894 894 if (!*a) ··· 1006 1006 return len; 1007 1007 } 1008 1008 1009 - struct most_aim_attribute most_aim_attr_add_link = 1009 + static struct most_aim_attribute most_aim_attr_add_link = 1010 1010 __ATTR(add_link, S_IRUGO | S_IWUSR, show_add_link, store_add_link); 1011 1011 1012 1012 static ssize_t show_remove_link(struct most_aim_obj *aim_obj, ··· 1057 1057 return len; 1058 1058 } 1059 1059 1060 - struct most_aim_attribute most_aim_attr_remove_link = 1060 + static struct most_aim_attribute most_aim_attr_remove_link = 1061 1061 __ATTR(remove_link, S_IRUGO | S_IWUSR, show_remove_link, store_remove_link); 1062 1062 1063 1063 static struct attribute *most_aim_def_attrs[] = { ··· 1121 1121 /** 1122 1122 * Instantiation of the MOST bus 1123 1123 */ 1124 - struct bus_type most_bus = { 1124 + static struct bus_type most_bus = { 1125 1125 .name = "most", 1126 1126 }; 1127 1127 1128 1128 /** 1129 1129 * Instantiation of the core driver 1130 1130 */ 1131 - struct device_driver mostcore = { 1131 + static struct device_driver mostcore = { 1132 1132 .name = "mostcore", 1133 1133 .bus = &most_bus, 1134 1134 }; ··· 1255 1255 * 1256 1256 * Returns the number of allocated and enqueued MBOs. 1257 1257 */ 1258 - int arm_mbo_chain(struct most_c_obj *c, int dir, void (*compl)(struct mbo *)) 1258 + static int arm_mbo_chain(struct most_c_obj *c, int dir, 1259 + void (*compl)(struct mbo *)) 1259 1260 { 1260 1261 unsigned int i; 1261 1262 int retval;