Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-13210 lnet: gcc8 add implicit-fallthrough decorator
[fs/lustre-release.git]
/
lnet
/
lnet
/
net_fault.c
diff --git
a/lnet/lnet/net_fault.c
b/lnet/lnet/net_fault.c
index
ce68063
..
56365fd
100644
(file)
--- a/
lnet/lnet/net_fault.c
+++ b/
lnet/lnet/net_fault.c
@@
-202,12
+202,10
@@
lnet_drop_rule_del(lnet_nid_t src, lnet_nid_t dst)
{
struct lnet_drop_rule *rule;
struct lnet_drop_rule *tmp;
-
struct list_head zombies
;
- int
n = 0;
+
LIST_HEAD(zombies)
;
+ int n = 0;
ENTRY;
- INIT_LIST_HEAD(&zombies);
-
lnet_net_lock(LNET_LOCK_EX);
list_for_each_entry_safe(rule, tmp, &the_lnet.ln_drop_rules, dr_link) {
if (rule->dr_attr.fa_src != src && src != 0)
@@
-703,6
+701,7
@@
delayed_msg_process(struct list_head *msg_list, bool drop)
case LNET_CREDIT_OK:
lnet_ni_recv(ni, msg->msg_private, msg, 0,
0, msg->msg_len, msg->msg_len);
+ /* fallthrough */
case LNET_CREDIT_WAIT:
continue;
default: /* failures */
@@
-723,10
+722,9
@@
delayed_msg_process(struct list_head *msg_list, bool drop)
void
lnet_delay_rule_check(void)
{
- struct lnet_delay_rule
*rule;
-
struct list_head msgs
;
+ struct lnet_delay_rule *rule;
+
LIST_HEAD(msgs)
;
- INIT_LIST_HEAD(&msgs);
while (1) {
if (list_empty(&delay_dd.dd_sched_rules))
break;
@@
-888,16
+886,13
@@
int
lnet_delay_rule_del(lnet_nid_t src, lnet_nid_t dst, bool shutdown)
{
struct lnet_delay_rule *rule;
- struct lnet_delay_rule
*tmp;
-
struct list_head rule_list
;
-
struct list_head msg_list
;
- int
n = 0;
- bool
cleanup;
+ struct lnet_delay_rule *tmp;
+
LIST_HEAD(rule_list)
;
+
LIST_HEAD(msg_list)
;
+ int n = 0;
+ bool cleanup;
ENTRY;
- INIT_LIST_HEAD(&rule_list);
- INIT_LIST_HEAD(&msg_list);
-
if (shutdown)
src = dst = 0;
@@
-1080,10
+1075,10
@@
lnet_fault_ctl(int opc, struct libcfs_ioctl_data *data)
int
lnet_fault_init(void)
{
-
CLASSERT(LNET_PUT_BIT =
= 1 << LNET_MSG_PUT);
-
CLASSERT(LNET_ACK_BIT =
= 1 << LNET_MSG_ACK);
-
CLASSERT(LNET_GET_BIT =
= 1 << LNET_MSG_GET);
-
CLASSERT(LNET_REPLY_BIT =
= 1 << LNET_MSG_REPLY);
+
BUILD_BUG_ON(LNET_PUT_BIT !
= 1 << LNET_MSG_PUT);
+
BUILD_BUG_ON(LNET_ACK_BIT !
= 1 << LNET_MSG_ACK);
+
BUILD_BUG_ON(LNET_GET_BIT !
= 1 << LNET_MSG_GET);
+
BUILD_BUG_ON(LNET_REPLY_BIT !
= 1 << LNET_MSG_REPLY);
mutex_init(&delay_dd.dd_mutex);
spin_lock_init(&delay_dd.dd_lock);