hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/netrom/nr_route.c
....@@ -1,8 +1,5 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
2
- * This program is free software; you can redistribute it and/or modify
3
- * it under the terms of the GNU General Public License as published by
4
- * the Free Software Foundation; either version 2 of the License, or
5
- * (at your option) any later version.
63 *
74 * Copyright Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
85 * Copyright Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk)
....@@ -266,7 +263,7 @@
266263 case 3:
267264 re_sort_routes(nr_node, 0, 1);
268265 re_sort_routes(nr_node, 1, 2);
269
- /* fall through */
266
+ fallthrough;
270267 case 2:
271268 re_sort_routes(nr_node, 0, 1);
272269 case 1:
....@@ -359,7 +356,7 @@
359356 switch (i) {
360357 case 0:
361358 nr_node->routes[0] = nr_node->routes[1];
362
- /* fall through */
359
+ fallthrough;
363360 case 1:
364361 nr_node->routes[1] = nr_node->routes[2];
365362 case 2:
....@@ -482,7 +479,7 @@
482479 switch (i) {
483480 case 0:
484481 s->routes[0] = s->routes[1];
485
- /* Fallthrough */
482
+ fallthrough;
486483 case 1:
487484 s->routes[1] = s->routes[2];
488485 case 2:
....@@ -529,7 +526,7 @@
529526 switch (i) {
530527 case 0:
531528 t->routes[0] = t->routes[1];
532
- /* fall through */
529
+ fallthrough;
533530 case 1:
534531 t->routes[1] = t->routes[2];
535532 case 2:
....@@ -842,6 +839,7 @@
842839 #ifdef CONFIG_PROC_FS
843840
844841 static void *nr_node_start(struct seq_file *seq, loff_t *pos)
842
+ __acquires(&nr_node_list_lock)
845843 {
846844 spin_lock_bh(&nr_node_list_lock);
847845 return seq_hlist_start_head(&nr_node_list, *pos);
....@@ -853,6 +851,7 @@
853851 }
854852
855853 static void nr_node_stop(struct seq_file *seq, void *v)
854
+ __releases(&nr_node_list_lock)
856855 {
857856 spin_unlock_bh(&nr_node_list_lock);
858857 }
....@@ -897,6 +896,7 @@
897896 };
898897
899898 static void *nr_neigh_start(struct seq_file *seq, loff_t *pos)
899
+ __acquires(&nr_neigh_list_lock)
900900 {
901901 spin_lock_bh(&nr_neigh_list_lock);
902902 return seq_hlist_start_head(&nr_neigh_list, *pos);
....@@ -908,6 +908,7 @@
908908 }
909909
910910 static void nr_neigh_stop(struct seq_file *seq, void *v)
911
+ __releases(&nr_neigh_list_lock)
911912 {
912913 spin_unlock_bh(&nr_neigh_list_lock);
913914 }