On Mon, Mar 27, 2017 at 10:31:26AM +0800, gfree.wind@xxxxxxxxxxx wrote: > From: Gao Feng <fgao@xxxxxxxxxx> > > When remove one expect, it needs three statements. And there are > multiple duplicated codes in current codes. So add one common func > nf_ct_remove_expect to simplify the codes. Applied with short name: netfilter: nf_ct_expect: Add nf_ct_remove_expect() And... > diff --git a/net/netfilter/nf_conntrack_helper.c b/net/netfilter/nf_conntrack_helper.c > index 6dc44d9..97bc0d2 100644 > --- a/net/netfilter/nf_conntrack_helper.c > +++ b/net/netfilter/nf_conntrack_helper.c > @@ -448,10 +448,8 @@ void nf_conntrack_helper_unregister(struct nf_conntrack_helper *me) > if ((rcu_dereference_protected( > help->helper, > lockdep_is_held(&nf_conntrack_expect_lock) > - ) == me || exp->helper == me) && > - del_timer(&exp->timeout)) { > - nf_ct_unlink_expect(exp); > - nf_ct_expect_put(exp); > + ) == me || exp->helper == me)) { > + nf_ct_remove_expect(exp); > } We can now remove braces for single statement in if(), I've done this manually here. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html