diff options
author | Antonio Quartulli <antonio@meshcoding.com> | 2014-05-10 12:56:37 -0400 |
---|---|---|
committer | Antonio Quartulli <antonio@meshcoding.com> | 2014-05-18 09:03:52 -0400 |
commit | f138694b15d164c64a0608b2ea36f7b153637565 (patch) | |
tree | 9e6571f5344750cb96f30776a83d5a6c5989e67d | |
parent | 33fcc5e05ea2b43ce0c6d356424ee5e25406f4c2 (diff) |
batman-adv: add blank line between declarations and the rest of the code
Reported by checkpatch with the following message:
"WARNING: Missing a blank line after declarations"
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
-rw-r--r-- | net/batman-adv/debugfs.c | 9 | ||||
-rw-r--r-- | net/batman-adv/distributed-arp-table.c | 1 | ||||
-rw-r--r-- | net/batman-adv/network-coding.c | 1 | ||||
-rw-r--r-- | net/batman-adv/sysfs.c | 10 |
4 files changed, 21 insertions, 0 deletions
diff --git a/net/batman-adv/debugfs.c b/net/batman-adv/debugfs.c index b758881be108..99f2ba0638fd 100644 --- a/net/batman-adv/debugfs.c +++ b/net/batman-adv/debugfs.c | |||
@@ -245,6 +245,7 @@ static int batadv_algorithms_open(struct inode *inode, struct file *file) | |||
245 | static int batadv_originators_open(struct inode *inode, struct file *file) | 245 | static int batadv_originators_open(struct inode *inode, struct file *file) |
246 | { | 246 | { |
247 | struct net_device *net_dev = (struct net_device *)inode->i_private; | 247 | struct net_device *net_dev = (struct net_device *)inode->i_private; |
248 | |||
248 | return single_open(file, batadv_orig_seq_print_text, net_dev); | 249 | return single_open(file, batadv_orig_seq_print_text, net_dev); |
249 | } | 250 | } |
250 | 251 | ||
@@ -258,18 +259,21 @@ static int batadv_originators_hardif_open(struct inode *inode, | |||
258 | struct file *file) | 259 | struct file *file) |
259 | { | 260 | { |
260 | struct net_device *net_dev = (struct net_device *)inode->i_private; | 261 | struct net_device *net_dev = (struct net_device *)inode->i_private; |
262 | |||
261 | return single_open(file, batadv_orig_hardif_seq_print_text, net_dev); | 263 | return single_open(file, batadv_orig_hardif_seq_print_text, net_dev); |
262 | } | 264 | } |
263 | 265 | ||
264 | static int batadv_gateways_open(struct inode *inode, struct file *file) | 266 | static int batadv_gateways_open(struct inode *inode, struct file *file) |
265 | { | 267 | { |
266 | struct net_device *net_dev = (struct net_device *)inode->i_private; | 268 | struct net_device *net_dev = (struct net_device *)inode->i_private; |
269 | |||
267 | return single_open(file, batadv_gw_client_seq_print_text, net_dev); | 270 | return single_open(file, batadv_gw_client_seq_print_text, net_dev); |
268 | } | 271 | } |
269 | 272 | ||
270 | static int batadv_transtable_global_open(struct inode *inode, struct file *file) | 273 | static int batadv_transtable_global_open(struct inode *inode, struct file *file) |
271 | { | 274 | { |
272 | struct net_device *net_dev = (struct net_device *)inode->i_private; | 275 | struct net_device *net_dev = (struct net_device *)inode->i_private; |
276 | |||
273 | return single_open(file, batadv_tt_global_seq_print_text, net_dev); | 277 | return single_open(file, batadv_tt_global_seq_print_text, net_dev); |
274 | } | 278 | } |
275 | 279 | ||
@@ -277,6 +281,7 @@ static int batadv_transtable_global_open(struct inode *inode, struct file *file) | |||
277 | static int batadv_bla_claim_table_open(struct inode *inode, struct file *file) | 281 | static int batadv_bla_claim_table_open(struct inode *inode, struct file *file) |
278 | { | 282 | { |
279 | struct net_device *net_dev = (struct net_device *)inode->i_private; | 283 | struct net_device *net_dev = (struct net_device *)inode->i_private; |
284 | |||
280 | return single_open(file, batadv_bla_claim_table_seq_print_text, | 285 | return single_open(file, batadv_bla_claim_table_seq_print_text, |
281 | net_dev); | 286 | net_dev); |
282 | } | 287 | } |
@@ -285,6 +290,7 @@ static int batadv_bla_backbone_table_open(struct inode *inode, | |||
285 | struct file *file) | 290 | struct file *file) |
286 | { | 291 | { |
287 | struct net_device *net_dev = (struct net_device *)inode->i_private; | 292 | struct net_device *net_dev = (struct net_device *)inode->i_private; |
293 | |||
288 | return single_open(file, batadv_bla_backbone_table_seq_print_text, | 294 | return single_open(file, batadv_bla_backbone_table_seq_print_text, |
289 | net_dev); | 295 | net_dev); |
290 | } | 296 | } |
@@ -300,6 +306,7 @@ static int batadv_bla_backbone_table_open(struct inode *inode, | |||
300 | static int batadv_dat_cache_open(struct inode *inode, struct file *file) | 306 | static int batadv_dat_cache_open(struct inode *inode, struct file *file) |
301 | { | 307 | { |
302 | struct net_device *net_dev = (struct net_device *)inode->i_private; | 308 | struct net_device *net_dev = (struct net_device *)inode->i_private; |
309 | |||
303 | return single_open(file, batadv_dat_cache_seq_print_text, net_dev); | 310 | return single_open(file, batadv_dat_cache_seq_print_text, net_dev); |
304 | } | 311 | } |
305 | #endif | 312 | #endif |
@@ -307,6 +314,7 @@ static int batadv_dat_cache_open(struct inode *inode, struct file *file) | |||
307 | static int batadv_transtable_local_open(struct inode *inode, struct file *file) | 314 | static int batadv_transtable_local_open(struct inode *inode, struct file *file) |
308 | { | 315 | { |
309 | struct net_device *net_dev = (struct net_device *)inode->i_private; | 316 | struct net_device *net_dev = (struct net_device *)inode->i_private; |
317 | |||
310 | return single_open(file, batadv_tt_local_seq_print_text, net_dev); | 318 | return single_open(file, batadv_tt_local_seq_print_text, net_dev); |
311 | } | 319 | } |
312 | 320 | ||
@@ -319,6 +327,7 @@ struct batadv_debuginfo { | |||
319 | static int batadv_nc_nodes_open(struct inode *inode, struct file *file) | 327 | static int batadv_nc_nodes_open(struct inode *inode, struct file *file) |
320 | { | 328 | { |
321 | struct net_device *net_dev = (struct net_device *)inode->i_private; | 329 | struct net_device *net_dev = (struct net_device *)inode->i_private; |
330 | |||
322 | return single_open(file, batadv_nc_nodes_seq_print_text, net_dev); | 331 | return single_open(file, batadv_nc_nodes_seq_print_text, net_dev); |
323 | } | 332 | } |
324 | #endif | 333 | #endif |
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c index b25fd64d727b..60889df808f3 100644 --- a/net/batman-adv/distributed-arp-table.c +++ b/net/batman-adv/distributed-arp-table.c | |||
@@ -662,6 +662,7 @@ static void batadv_dat_tvlv_container_update(struct batadv_priv *bat_priv) | |||
662 | void batadv_dat_status_update(struct net_device *net_dev) | 662 | void batadv_dat_status_update(struct net_device *net_dev) |
663 | { | 663 | { |
664 | struct batadv_priv *bat_priv = netdev_priv(net_dev); | 664 | struct batadv_priv *bat_priv = netdev_priv(net_dev); |
665 | |||
665 | batadv_dat_tvlv_container_update(bat_priv); | 666 | batadv_dat_tvlv_container_update(bat_priv); |
666 | } | 667 | } |
667 | 668 | ||
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c index a9546fe541eb..40a2fc4bcf4c 100644 --- a/net/batman-adv/network-coding.c +++ b/net/batman-adv/network-coding.c | |||
@@ -86,6 +86,7 @@ static void batadv_nc_tvlv_container_update(struct batadv_priv *bat_priv) | |||
86 | void batadv_nc_status_update(struct net_device *net_dev) | 86 | void batadv_nc_status_update(struct net_device *net_dev) |
87 | { | 87 | { |
88 | struct batadv_priv *bat_priv = netdev_priv(net_dev); | 88 | struct batadv_priv *bat_priv = netdev_priv(net_dev); |
89 | |||
89 | batadv_nc_tvlv_container_update(bat_priv); | 90 | batadv_nc_tvlv_container_update(bat_priv); |
90 | } | 91 | } |
91 | 92 | ||
diff --git a/net/batman-adv/sysfs.c b/net/batman-adv/sysfs.c index 1ebb0d9e2ea5..f51b484abaa4 100644 --- a/net/batman-adv/sysfs.c +++ b/net/batman-adv/sysfs.c | |||
@@ -29,12 +29,14 @@ | |||
29 | static struct net_device *batadv_kobj_to_netdev(struct kobject *obj) | 29 | static struct net_device *batadv_kobj_to_netdev(struct kobject *obj) |
30 | { | 30 | { |
31 | struct device *dev = container_of(obj->parent, struct device, kobj); | 31 | struct device *dev = container_of(obj->parent, struct device, kobj); |
32 | |||
32 | return to_net_dev(dev); | 33 | return to_net_dev(dev); |
33 | } | 34 | } |
34 | 35 | ||
35 | static struct batadv_priv *batadv_kobj_to_batpriv(struct kobject *obj) | 36 | static struct batadv_priv *batadv_kobj_to_batpriv(struct kobject *obj) |
36 | { | 37 | { |
37 | struct net_device *net_dev = batadv_kobj_to_netdev(obj); | 38 | struct net_device *net_dev = batadv_kobj_to_netdev(obj); |
39 | |||
38 | return netdev_priv(net_dev); | 40 | return netdev_priv(net_dev); |
39 | } | 41 | } |
40 | 42 | ||
@@ -124,6 +126,7 @@ ssize_t batadv_store_##_name(struct kobject *kobj, \ | |||
124 | { \ | 126 | { \ |
125 | struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \ | 127 | struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \ |
126 | struct batadv_priv *bat_priv = netdev_priv(net_dev); \ | 128 | struct batadv_priv *bat_priv = netdev_priv(net_dev); \ |
129 | \ | ||
127 | return __batadv_store_bool_attr(buff, count, _post_func, attr, \ | 130 | return __batadv_store_bool_attr(buff, count, _post_func, attr, \ |
128 | &bat_priv->_name, net_dev); \ | 131 | &bat_priv->_name, net_dev); \ |
129 | } | 132 | } |
@@ -133,6 +136,7 @@ ssize_t batadv_show_##_name(struct kobject *kobj, \ | |||
133 | struct attribute *attr, char *buff) \ | 136 | struct attribute *attr, char *buff) \ |
134 | { \ | 137 | { \ |
135 | struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \ | 138 | struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \ |
139 | \ | ||
136 | return sprintf(buff, "%s\n", \ | 140 | return sprintf(buff, "%s\n", \ |
137 | atomic_read(&bat_priv->_name) == 0 ? \ | 141 | atomic_read(&bat_priv->_name) == 0 ? \ |
138 | "disabled" : "enabled"); \ | 142 | "disabled" : "enabled"); \ |
@@ -155,6 +159,7 @@ ssize_t batadv_store_##_name(struct kobject *kobj, \ | |||
155 | { \ | 159 | { \ |
156 | struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \ | 160 | struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \ |
157 | struct batadv_priv *bat_priv = netdev_priv(net_dev); \ | 161 | struct batadv_priv *bat_priv = netdev_priv(net_dev); \ |
162 | \ | ||
158 | return __batadv_store_uint_attr(buff, count, _min, _max, \ | 163 | return __batadv_store_uint_attr(buff, count, _min, _max, \ |
159 | _post_func, attr, \ | 164 | _post_func, attr, \ |
160 | &bat_priv->_name, net_dev); \ | 165 | &bat_priv->_name, net_dev); \ |
@@ -165,6 +170,7 @@ ssize_t batadv_show_##_name(struct kobject *kobj, \ | |||
165 | struct attribute *attr, char *buff) \ | 170 | struct attribute *attr, char *buff) \ |
166 | { \ | 171 | { \ |
167 | struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \ | 172 | struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \ |
173 | \ | ||
168 | return sprintf(buff, "%i\n", atomic_read(&bat_priv->_name)); \ | 174 | return sprintf(buff, "%i\n", atomic_read(&bat_priv->_name)); \ |
169 | } \ | 175 | } \ |
170 | 176 | ||
@@ -188,6 +194,7 @@ ssize_t batadv_store_vlan_##_name(struct kobject *kobj, \ | |||
188 | size_t res = __batadv_store_bool_attr(buff, count, _post_func, \ | 194 | size_t res = __batadv_store_bool_attr(buff, count, _post_func, \ |
189 | attr, &vlan->_name, \ | 195 | attr, &vlan->_name, \ |
190 | bat_priv->soft_iface); \ | 196 | bat_priv->soft_iface); \ |
197 | \ | ||
191 | batadv_softif_vlan_free_ref(vlan); \ | 198 | batadv_softif_vlan_free_ref(vlan); \ |
192 | return res; \ | 199 | return res; \ |
193 | } | 200 | } |
@@ -202,6 +209,7 @@ ssize_t batadv_show_vlan_##_name(struct kobject *kobj, \ | |||
202 | size_t res = sprintf(buff, "%s\n", \ | 209 | size_t res = sprintf(buff, "%s\n", \ |
203 | atomic_read(&vlan->_name) == 0 ? \ | 210 | atomic_read(&vlan->_name) == 0 ? \ |
204 | "disabled" : "enabled"); \ | 211 | "disabled" : "enabled"); \ |
212 | \ | ||
205 | batadv_softif_vlan_free_ref(vlan); \ | 213 | batadv_softif_vlan_free_ref(vlan); \ |
206 | return res; \ | 214 | return res; \ |
207 | } | 215 | } |
@@ -324,12 +332,14 @@ static ssize_t batadv_show_bat_algo(struct kobject *kobj, | |||
324 | struct attribute *attr, char *buff) | 332 | struct attribute *attr, char *buff) |
325 | { | 333 | { |
326 | struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); | 334 | struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); |
335 | |||
327 | return sprintf(buff, "%s\n", bat_priv->bat_algo_ops->name); | 336 | return sprintf(buff, "%s\n", bat_priv->bat_algo_ops->name); |
328 | } | 337 | } |
329 | 338 | ||
330 | static void batadv_post_gw_reselect(struct net_device *net_dev) | 339 | static void batadv_post_gw_reselect(struct net_device *net_dev) |
331 | { | 340 | { |
332 | struct batadv_priv *bat_priv = netdev_priv(net_dev); | 341 | struct batadv_priv *bat_priv = netdev_priv(net_dev); |
342 | |||
333 | batadv_gw_reselect(bat_priv); | 343 | batadv_gw_reselect(bat_priv); |
334 | } | 344 | } |
335 | 345 | ||