diff --git a/net/tipc/link.c b/net/tipc/link.c index d8a4b90b029c15353d5ab0f5239443bd5e8a11c4..6ffae0e8809e5dc875a3c381b5109d14a0996ded 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -1954,10 +1954,7 @@ void tipc_link_send_proto_msg(struct link *l_ptr, u32 msg_typ, int probe_msg, msg_set_max_pkt(msg, l_ptr->max_pkt_target); } - if (tipc_node_redundant_links(l_ptr->owner)) - msg_set_redundant_link(msg); - else - msg_clear_redundant_link(msg); + msg_set_redundant_link(msg, tipc_node_redundant_links(l_ptr->owner)); msg_set_linkprio(msg, l_ptr->priority); /* Ensure sequence number will not fit : */ diff --git a/net/tipc/msg.h b/net/tipc/msg.h index 6948d3dbab0b2943d8e216ee888c035e0d37c8c5..bea0126cb676bf1b86c3441c305122113a26b1e6 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h @@ -719,14 +719,9 @@ static inline u32 msg_redundant_link(struct tipc_msg *m) return msg_bits(m, 5, 12, 0x1); } -static inline void msg_set_redundant_link(struct tipc_msg *m) +static inline void msg_set_redundant_link(struct tipc_msg *m, u32 r) { - msg_set_bits(m, 5, 12, 0x1, 1); -} - -static inline void msg_clear_redundant_link(struct tipc_msg *m) -{ - msg_set_bits(m, 5, 12, 0x1, 0); + msg_set_bits(m, 5, 12, 0x1, r); }