aboutsummaryrefslogtreecommitdiffstats
path: root/net/rose/af_rose.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rose/af_rose.c')
-rw-r--r--net/rose/af_rose.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index b768fe9d5e7a..cf68e6e4054a 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -165,10 +165,9 @@ static void rose_remove_socket(struct sock *sk)
165void rose_kill_by_neigh(struct rose_neigh *neigh) 165void rose_kill_by_neigh(struct rose_neigh *neigh)
166{ 166{
167 struct sock *s; 167 struct sock *s;
168 struct hlist_node *node;
169 168
170 spin_lock_bh(&rose_list_lock); 169 spin_lock_bh(&rose_list_lock);
171 sk_for_each(s, node, &rose_list) { 170 sk_for_each(s, &rose_list) {
172 struct rose_sock *rose = rose_sk(s); 171 struct rose_sock *rose = rose_sk(s);
173 172
174 if (rose->neighbour == neigh) { 173 if (rose->neighbour == neigh) {
@@ -186,10 +185,9 @@ void rose_kill_by_neigh(struct rose_neigh *neigh)
186static void rose_kill_by_device(struct net_device *dev) 185static void rose_kill_by_device(struct net_device *dev)
187{ 186{
188 struct sock *s; 187 struct sock *s;
189 struct hlist_node *node;
190 188
191 spin_lock_bh(&rose_list_lock); 189 spin_lock_bh(&rose_list_lock);
192 sk_for_each(s, node, &rose_list) { 190 sk_for_each(s, &rose_list) {
193 struct rose_sock *rose = rose_sk(s); 191 struct rose_sock *rose = rose_sk(s);
194 192
195 if (rose->device == dev) { 193 if (rose->device == dev) {
@@ -246,10 +244,9 @@ static void rose_insert_socket(struct sock *sk)
246static struct sock *rose_find_listener(rose_address *addr, ax25_address *call) 244static struct sock *rose_find_listener(rose_address *addr, ax25_address *call)
247{ 245{
248 struct sock *s; 246 struct sock *s;
249 struct hlist_node *node;
250 247
251 spin_lock_bh(&rose_list_lock); 248 spin_lock_bh(&rose_list_lock);
252 sk_for_each(s, node, &rose_list) { 249 sk_for_each(s, &rose_list) {
253 struct rose_sock *rose = rose_sk(s); 250 struct rose_sock *rose = rose_sk(s);
254 251
255 if (!rosecmp(&rose->source_addr, addr) && 252 if (!rosecmp(&rose->source_addr, addr) &&
@@ -258,7 +255,7 @@ static struct sock *rose_find_listener(rose_address *addr, ax25_address *call)
258 goto found; 255 goto found;
259 } 256 }
260 257
261 sk_for_each(s, node, &rose_list) { 258 sk_for_each(s, &rose_list) {
262 struct rose_sock *rose = rose_sk(s); 259 struct rose_sock *rose = rose_sk(s);
263 260
264 if (!rosecmp(&rose->source_addr, addr) && 261 if (!rosecmp(&rose->source_addr, addr) &&
@@ -278,10 +275,9 @@ found:
278struct sock *rose_find_socket(unsigned int lci, struct rose_neigh *neigh) 275struct sock *rose_find_socket(unsigned int lci, struct rose_neigh *neigh)
279{ 276{
280 struct sock *s; 277 struct sock *s;
281 struct hlist_node *node;
282 278
283 spin_lock_bh(&rose_list_lock); 279 spin_lock_bh(&rose_list_lock);
284 sk_for_each(s, node, &rose_list) { 280 sk_for_each(s, &rose_list) {
285 struct rose_sock *rose = rose_sk(s); 281 struct rose_sock *rose = rose_sk(s);
286 282
287 if (rose->lci == lci && rose->neighbour == neigh) 283 if (rose->lci == lci && rose->neighbour == neigh)