Author: marek Date: 2010-05-01 20:57:27 +0200 (Sat, 01 May 2010) New Revision: 1644
Modified: trunk/batman-adv-kernelland/bat_sysfs.c trunk/batman-adv-kernelland/vis.c Log: batman-adv: Import sparse fixes from mainline
I fixed sparce warnings as i moved patches from maint to mainline. This patch move the fixes back to maint.
Signed-off-by: Andrew Lunn andrew@lunn.ch
Modified: trunk/batman-adv-kernelland/bat_sysfs.c =================================================================== --- trunk/batman-adv-kernelland/bat_sysfs.c 2010-05-01 18:40:30 UTC (rev 1643) +++ trunk/batman-adv-kernelland/bat_sysfs.c 2010-05-01 18:57:27 UTC (rev 1644) @@ -478,7 +478,8 @@ static ssize_t show_mesh_iface(struct kobject *kobj, struct attribute *attr, char *buff) { - struct net_device *net_dev = to_net_dev(to_dev(kobj->parent)); + struct device *dev = to_dev(kobj->parent); + struct net_device *net_dev = to_net_dev(dev); struct batman_if *batman_if = get_batman_if_by_netdev(net_dev);
if (!batman_if) @@ -492,7 +493,8 @@ static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr, char *buff, size_t count) { - struct net_device *net_dev = to_net_dev(to_dev(kobj->parent)); + struct device *dev = to_dev(kobj->parent); + struct net_device *net_dev = to_net_dev(dev); struct batman_if *batman_if = get_batman_if_by_netdev(net_dev); int status_tmp = -1;
@@ -530,7 +532,8 @@ static ssize_t show_iface_status(struct kobject *kobj, struct attribute *attr, char *buff) { - struct net_device *net_dev = to_net_dev(to_dev(kobj->parent)); + struct device *dev = to_dev(kobj->parent); + struct net_device *net_dev = to_net_dev(dev); struct batman_if *batman_if = get_batman_if_by_netdev(net_dev);
if (!batman_if)
Modified: trunk/batman-adv-kernelland/vis.c =================================================================== --- trunk/batman-adv-kernelland/vis.c 2010-05-01 18:40:30 UTC (rev 1643) +++ trunk/batman-adv-kernelland/vis.c 2010-05-01 18:57:27 UTC (rev 1644) @@ -103,7 +103,7 @@
/* insert interface to the list of interfaces of one originator, if it * does not already exist in the list */ -void vis_data_insert_interface(const uint8_t *interface, +static void vis_data_insert_interface(const uint8_t *interface, struct hlist_head *if_list, bool primary) { @@ -124,7 +124,7 @@ hlist_add_head(&entry->list, if_list); }
-ssize_t vis_data_read_prim_sec(char *buff, struct hlist_head *if_list) +static ssize_t vis_data_read_prim_sec(char *buff, struct hlist_head *if_list) { struct if_list_entry *entry; struct hlist_node *pos; @@ -144,8 +144,8 @@ }
/* read an entry */ -ssize_t vis_data_read_entry(char *buff, struct vis_info_entry *entry, - uint8_t *src, bool primary) +static ssize_t vis_data_read_entry(char *buff, struct vis_info_entry *entry, + uint8_t *src, bool primary) { char to[40];