Browse Source

treewide: make some functions static

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker 5 years ago
parent
commit
70506bf09b
7 changed files with 7 additions and 11 deletions
  1. 2 2
      bridge.c
  2. 1 1
      device.c
  3. 0 1
      device.h
  4. 1 1
      interface-ip.c
  5. 0 1
      interface-ip.h
  6. 3 3
      interface.c
  7. 0 2
      interface.h

+ 2 - 2
bridge.c

@@ -77,7 +77,7 @@ static struct device *bridge_create(const char *name, struct device_type *devtyp
 static void bridge_config_init(struct device *dev);
 static void bridge_free(struct device *dev);
 static void bridge_dump_info(struct device *dev, struct blob_buf *b);
-enum dev_change_type
+static enum dev_change_type
 bridge_reload(struct device *dev, struct blob_attr *attr);
 
 static struct device_type bridge_device_type = {
@@ -633,7 +633,7 @@ bridge_apply_settings(struct bridge_state *bst, struct blob_attr **tb)
 		cfg->bridge_empty = blobmsg_get_bool(cur);
 }
 
-enum dev_change_type
+static enum dev_change_type
 bridge_reload(struct device *dev, struct blob_attr *attr)
 {
 	struct blob_attr *tb_dev[__DEV_ATTR_MAX];

+ 1 - 1
device.c

@@ -733,7 +733,7 @@ void device_add_user(struct device_user *dep, struct device *dev)
 	__device_add_user(dep, dev);
 }
 
-void
+static void
 device_free(struct device *dev)
 {
 	__devlock++;

+ 0 - 1
device.h

@@ -269,7 +269,6 @@ void device_release(struct device_user *dep);
 int device_check_state(struct device *dev);
 void device_dump_status(struct blob_buf *b, struct device *dev);
 
-void device_free(struct device *dev);
 void device_free_unused(struct device *dev);
 
 struct device *get_vlan_device_chain(const char *ifname, bool create);

+ 1 - 1
interface-ip.c

@@ -1176,7 +1176,7 @@ interface_ip_set_ula_prefix(const char *prefix)
 	}
 }
 
-void
+static void
 interface_add_dns_server(struct interface_ip_settings *ip, const char *str)
 {
 	struct dns_server *s;

+ 0 - 1
interface-ip.h

@@ -153,7 +153,6 @@ extern const struct uci_blob_param_list route_attr_list;
 extern struct list_head prefixes;
 
 void interface_ip_init(struct interface *iface);
-void interface_add_dns_server(struct interface_ip_settings *ip, const char *str);
 void interface_add_dns_server_list(struct interface_ip_settings *ip, struct blob_attr *list);
 void interface_add_dns_search_list(struct interface_ip_settings *ip, struct blob_attr *list);
 void interface_write_resolv_conf(void);

+ 3 - 3
interface.c

@@ -78,7 +78,7 @@ const struct uci_blob_param_list interface_attr_list = {
 };
 
 static void
-set_config_state(struct interface *iface, enum interface_config_state s);
+interface_set_main_dev(struct interface *iface, struct device *dev);
 static void
 interface_event(struct interface *iface, enum interface_event ev);
 
@@ -964,7 +964,7 @@ interface_set_l3_dev(struct interface *iface, struct device *dev)
 	}
 }
 
-void
+static void
 interface_set_main_dev(struct interface *iface, struct device *dev)
 {
 	bool claimed = iface->l3_dev.claimed;
@@ -988,7 +988,7 @@ interface_set_main_dev(struct interface *iface, struct device *dev)
 		interface_set_l3_dev(iface, dev);
 }
 
-int
+static int
 interface_remove_link(struct interface *iface, struct device *dev)
 {
 	struct device *mdev = iface->main_dev.dev;

+ 0 - 2
interface.h

@@ -186,13 +186,11 @@ void interface_set_up(struct interface *iface);
 void interface_set_down(struct interface *iface);
 int interface_renew(struct interface *iface);
 
-void interface_set_main_dev(struct interface *iface, struct device *dev);
 void interface_set_l3_dev(struct interface *iface, struct device *dev);
 
 void interface_add_user(struct interface_user *dep, struct interface *iface);
 void interface_remove_user(struct interface_user *dep);
 
-int interface_remove_link(struct interface *iface, struct device *dev);
 int interface_handle_link(struct interface *iface, const char *name, bool add, bool link_ext);
 
 void interface_add_error(struct interface *iface, const char *subsystem,