diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-06-05 16:31:31 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-07-01 16:47:21 -0400 |
commit | 56303d34a332be8e2f4daf7891ebc12cb7900529 (patch) | |
tree | bc972916771e698bd8a88fd66917950ce0bd48c1 /net/batman-adv/icmp_socket.c | |
parent | 96412690116afcc1b2705615b5a7c8dc6c5e905f (diff) |
batman-adv: Prefix types structs with batadv_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/icmp_socket.c')
-rw-r--r-- | net/batman-adv/icmp_socket.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c index ca07580c1b44..bde3cf747507 100644 --- a/net/batman-adv/icmp_socket.c +++ b/net/batman-adv/icmp_socket.c | |||
@@ -26,9 +26,9 @@ | |||
26 | #include "originator.h" | 26 | #include "originator.h" |
27 | #include "hard-interface.h" | 27 | #include "hard-interface.h" |
28 | 28 | ||
29 | static struct socket_client *batadv_socket_client_hash[256]; | 29 | static struct batadv_socket_client *batadv_socket_client_hash[256]; |
30 | 30 | ||
31 | static void batadv_socket_add_packet(struct socket_client *socket_client, | 31 | static void batadv_socket_add_packet(struct batadv_socket_client *socket_client, |
32 | struct batadv_icmp_packet_rr *icmp_packet, | 32 | struct batadv_icmp_packet_rr *icmp_packet, |
33 | size_t icmp_len); | 33 | size_t icmp_len); |
34 | 34 | ||
@@ -40,7 +40,7 @@ void batadv_socket_init(void) | |||
40 | static int batadv_socket_open(struct inode *inode, struct file *file) | 40 | static int batadv_socket_open(struct inode *inode, struct file *file) |
41 | { | 41 | { |
42 | unsigned int i; | 42 | unsigned int i; |
43 | struct socket_client *socket_client; | 43 | struct batadv_socket_client *socket_client; |
44 | 44 | ||
45 | nonseekable_open(inode, file); | 45 | nonseekable_open(inode, file); |
46 | 46 | ||
@@ -77,8 +77,8 @@ static int batadv_socket_open(struct inode *inode, struct file *file) | |||
77 | 77 | ||
78 | static int batadv_socket_release(struct inode *inode, struct file *file) | 78 | static int batadv_socket_release(struct inode *inode, struct file *file) |
79 | { | 79 | { |
80 | struct socket_client *socket_client = file->private_data; | 80 | struct batadv_socket_client *socket_client = file->private_data; |
81 | struct socket_packet *socket_packet; | 81 | struct batadv_socket_packet *socket_packet; |
82 | struct list_head *list_pos, *list_pos_tmp; | 82 | struct list_head *list_pos, *list_pos_tmp; |
83 | 83 | ||
84 | spin_lock_bh(&socket_client->lock); | 84 | spin_lock_bh(&socket_client->lock); |
@@ -86,7 +86,7 @@ static int batadv_socket_release(struct inode *inode, struct file *file) | |||
86 | /* for all packets in the queue ... */ | 86 | /* for all packets in the queue ... */ |
87 | list_for_each_safe(list_pos, list_pos_tmp, &socket_client->queue_list) { | 87 | list_for_each_safe(list_pos, list_pos_tmp, &socket_client->queue_list) { |
88 | socket_packet = list_entry(list_pos, | 88 | socket_packet = list_entry(list_pos, |
89 | struct socket_packet, list); | 89 | struct batadv_socket_packet, list); |
90 | 90 | ||
91 | list_del(list_pos); | 91 | list_del(list_pos); |
92 | kfree(socket_packet); | 92 | kfree(socket_packet); |
@@ -104,8 +104,8 @@ static int batadv_socket_release(struct inode *inode, struct file *file) | |||
104 | static ssize_t batadv_socket_read(struct file *file, char __user *buf, | 104 | static ssize_t batadv_socket_read(struct file *file, char __user *buf, |
105 | size_t count, loff_t *ppos) | 105 | size_t count, loff_t *ppos) |
106 | { | 106 | { |
107 | struct socket_client *socket_client = file->private_data; | 107 | struct batadv_socket_client *socket_client = file->private_data; |
108 | struct socket_packet *socket_packet; | 108 | struct batadv_socket_packet *socket_packet; |
109 | size_t packet_len; | 109 | size_t packet_len; |
110 | int error; | 110 | int error; |
111 | 111 | ||
@@ -127,7 +127,7 @@ static ssize_t batadv_socket_read(struct file *file, char __user *buf, | |||
127 | spin_lock_bh(&socket_client->lock); | 127 | spin_lock_bh(&socket_client->lock); |
128 | 128 | ||
129 | socket_packet = list_first_entry(&socket_client->queue_list, | 129 | socket_packet = list_first_entry(&socket_client->queue_list, |
130 | struct socket_packet, list); | 130 | struct batadv_socket_packet, list); |
131 | list_del(&socket_packet->list); | 131 | list_del(&socket_packet->list); |
132 | socket_client->queue_len--; | 132 | socket_client->queue_len--; |
133 | 133 | ||
@@ -147,14 +147,14 @@ static ssize_t batadv_socket_read(struct file *file, char __user *buf, | |||
147 | static ssize_t batadv_socket_write(struct file *file, const char __user *buff, | 147 | static ssize_t batadv_socket_write(struct file *file, const char __user *buff, |
148 | size_t len, loff_t *off) | 148 | size_t len, loff_t *off) |
149 | { | 149 | { |
150 | struct socket_client *socket_client = file->private_data; | 150 | struct batadv_socket_client *socket_client = file->private_data; |
151 | struct bat_priv *bat_priv = socket_client->bat_priv; | 151 | struct batadv_priv *bat_priv = socket_client->bat_priv; |
152 | struct hard_iface *primary_if = NULL; | 152 | struct batadv_hard_iface *primary_if = NULL; |
153 | struct sk_buff *skb; | 153 | struct sk_buff *skb; |
154 | struct batadv_icmp_packet_rr *icmp_packet; | 154 | struct batadv_icmp_packet_rr *icmp_packet; |
155 | 155 | ||
156 | struct orig_node *orig_node = NULL; | 156 | struct batadv_orig_node *orig_node = NULL; |
157 | struct neigh_node *neigh_node = NULL; | 157 | struct batadv_neigh_node *neigh_node = NULL; |
158 | size_t packet_len = sizeof(struct batadv_icmp_packet); | 158 | size_t packet_len = sizeof(struct batadv_icmp_packet); |
159 | 159 | ||
160 | if (len < sizeof(struct batadv_icmp_packet)) { | 160 | if (len < sizeof(struct batadv_icmp_packet)) { |
@@ -255,7 +255,7 @@ out: | |||
255 | 255 | ||
256 | static unsigned int batadv_socket_poll(struct file *file, poll_table *wait) | 256 | static unsigned int batadv_socket_poll(struct file *file, poll_table *wait) |
257 | { | 257 | { |
258 | struct socket_client *socket_client = file->private_data; | 258 | struct batadv_socket_client *socket_client = file->private_data; |
259 | 259 | ||
260 | poll_wait(file, &socket_client->queue_wait, wait); | 260 | poll_wait(file, &socket_client->queue_wait, wait); |
261 | 261 | ||
@@ -275,7 +275,7 @@ static const struct file_operations batadv_fops = { | |||
275 | .llseek = no_llseek, | 275 | .llseek = no_llseek, |
276 | }; | 276 | }; |
277 | 277 | ||
278 | int batadv_socket_setup(struct bat_priv *bat_priv) | 278 | int batadv_socket_setup(struct batadv_priv *bat_priv) |
279 | { | 279 | { |
280 | struct dentry *d; | 280 | struct dentry *d; |
281 | 281 | ||
@@ -293,11 +293,11 @@ err: | |||
293 | return -ENOMEM; | 293 | return -ENOMEM; |
294 | } | 294 | } |
295 | 295 | ||
296 | static void batadv_socket_add_packet(struct socket_client *socket_client, | 296 | static void batadv_socket_add_packet(struct batadv_socket_client *socket_client, |
297 | struct batadv_icmp_packet_rr *icmp_packet, | 297 | struct batadv_icmp_packet_rr *icmp_packet, |
298 | size_t icmp_len) | 298 | size_t icmp_len) |
299 | { | 299 | { |
300 | struct socket_packet *socket_packet; | 300 | struct batadv_socket_packet *socket_packet; |
301 | 301 | ||
302 | socket_packet = kmalloc(sizeof(*socket_packet), GFP_ATOMIC); | 302 | socket_packet = kmalloc(sizeof(*socket_packet), GFP_ATOMIC); |
303 | 303 | ||
@@ -324,7 +324,8 @@ static void batadv_socket_add_packet(struct socket_client *socket_client, | |||
324 | 324 | ||
325 | if (socket_client->queue_len > 100) { | 325 | if (socket_client->queue_len > 100) { |
326 | socket_packet = list_first_entry(&socket_client->queue_list, | 326 | socket_packet = list_first_entry(&socket_client->queue_list, |
327 | struct socket_packet, list); | 327 | struct batadv_socket_packet, |
328 | list); | ||
328 | 329 | ||
329 | list_del(&socket_packet->list); | 330 | list_del(&socket_packet->list); |
330 | kfree(socket_packet); | 331 | kfree(socket_packet); |
@@ -339,7 +340,7 @@ static void batadv_socket_add_packet(struct socket_client *socket_client, | |||
339 | void batadv_socket_receive_packet(struct batadv_icmp_packet_rr *icmp_packet, | 340 | void batadv_socket_receive_packet(struct batadv_icmp_packet_rr *icmp_packet, |
340 | size_t icmp_len) | 341 | size_t icmp_len) |
341 | { | 342 | { |
342 | struct socket_client *hash; | 343 | struct batadv_socket_client *hash; |
343 | 344 | ||
344 | hash = batadv_socket_client_hash[icmp_packet->uid]; | 345 | hash = batadv_socket_client_hash[icmp_packet->uid]; |
345 | if (hash) | 346 | if (hash) |