mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
netfilter: conntrack: remove empty pernet fini stubs
after moving sysctl handling into single place, the init functions can't fail anymore and some of the fini functions are empty. Remove them and change return type to void. This also simplifies error unwinding in conntrack module init path. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
cb2833ed00
commit
fc3893fd5c
9 changed files with 16 additions and 62 deletions
|
|
@ -58,8 +58,7 @@ static inline void nf_ct_set_acct(struct net *net, bool enable)
|
|||
net->ct.sysctl_acct = enable;
|
||||
}
|
||||
|
||||
int nf_conntrack_acct_pernet_init(struct net *net);
|
||||
void nf_conntrack_acct_pernet_fini(struct net *net);
|
||||
void nf_conntrack_acct_pernet_init(struct net *net);
|
||||
|
||||
int nf_conntrack_acct_init(void);
|
||||
void nf_conntrack_acct_fini(void);
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ void nf_ct_expect_event_report(enum ip_conntrack_expect_events event,
|
|||
struct nf_conntrack_expect *exp,
|
||||
u32 portid, int report);
|
||||
|
||||
int nf_conntrack_ecache_pernet_init(struct net *net);
|
||||
void nf_conntrack_ecache_pernet_init(struct net *net);
|
||||
void nf_conntrack_ecache_pernet_fini(struct net *net);
|
||||
|
||||
int nf_conntrack_ecache_init(void);
|
||||
|
|
@ -182,10 +182,7 @@ static inline void nf_ct_expect_event_report(enum ip_conntrack_expect_events e,
|
|||
u32 portid,
|
||||
int report) {}
|
||||
|
||||
static inline int nf_conntrack_ecache_pernet_init(struct net *net)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void nf_conntrack_ecache_pernet_init(struct net *net) {}
|
||||
|
||||
static inline void nf_conntrack_ecache_pernet_fini(struct net *net)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -124,8 +124,7 @@ static inline void *nfct_help_data(const struct nf_conn *ct)
|
|||
return (void *)help->data;
|
||||
}
|
||||
|
||||
int nf_conntrack_helper_pernet_init(struct net *net);
|
||||
void nf_conntrack_helper_pernet_fini(struct net *net);
|
||||
void nf_conntrack_helper_pernet_init(struct net *net);
|
||||
|
||||
int nf_conntrack_helper_init(void);
|
||||
void nf_conntrack_helper_fini(void);
|
||||
|
|
|
|||
|
|
@ -49,21 +49,12 @@ static inline void nf_ct_set_tstamp(struct net *net, bool enable)
|
|||
}
|
||||
|
||||
#ifdef CONFIG_NF_CONNTRACK_TIMESTAMP
|
||||
int nf_conntrack_tstamp_pernet_init(struct net *net);
|
||||
void nf_conntrack_tstamp_pernet_fini(struct net *net);
|
||||
void nf_conntrack_tstamp_pernet_init(struct net *net);
|
||||
|
||||
int nf_conntrack_tstamp_init(void);
|
||||
void nf_conntrack_tstamp_fini(void);
|
||||
#else
|
||||
static inline int nf_conntrack_tstamp_pernet_init(struct net *net)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void nf_conntrack_tstamp_pernet_fini(struct net *net)
|
||||
{
|
||||
return;
|
||||
}
|
||||
static inline void nf_conntrack_tstamp_pernet_init(struct net *net) {}
|
||||
|
||||
static inline int nf_conntrack_tstamp_init(void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue