Message ID | 20190610151908.23116-1-yuehaibing@huawei.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | [net-next] tcp: Make tcp_fastopen_alloc_ctx static | expand |
On 6/10/19 11:19 AM, YueHaibing wrote: > Fix sparse warning: > > net/ipv4/tcp_fastopen.c:75:29: warning: > symbol 'tcp_fastopen_alloc_ctx' was not declared. Should it be static? > > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > --- > net/ipv4/tcp_fastopen.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c > index 8e15804..7d19fa4 100644 > --- a/net/ipv4/tcp_fastopen.c > +++ b/net/ipv4/tcp_fastopen.c > @@ -72,9 +72,9 @@ void tcp_fastopen_ctx_destroy(struct net *net) > call_rcu(&ctxt->rcu, tcp_fastopen_ctx_free); > } > > -struct tcp_fastopen_context *tcp_fastopen_alloc_ctx(void *primary_key, > - void *backup_key, > - unsigned int len) > +static struct tcp_fastopen_context *tcp_fastopen_alloc_ctx(void *primary_key, > + void *backup_key, > + unsigned int len) > { > struct tcp_fastopen_context *new_ctx; > void *key = primary_key; > Thanks for fixing. Acked-by: Jason Baron <jbaron@akamai.com>
diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c index 8e15804..7d19fa4 100644 --- a/net/ipv4/tcp_fastopen.c +++ b/net/ipv4/tcp_fastopen.c @@ -72,9 +72,9 @@ void tcp_fastopen_ctx_destroy(struct net *net) call_rcu(&ctxt->rcu, tcp_fastopen_ctx_free); } -struct tcp_fastopen_context *tcp_fastopen_alloc_ctx(void *primary_key, - void *backup_key, - unsigned int len) +static struct tcp_fastopen_context *tcp_fastopen_alloc_ctx(void *primary_key, + void *backup_key, + unsigned int len) { struct tcp_fastopen_context *new_ctx; void *key = primary_key;
Fix sparse warning: net/ipv4/tcp_fastopen.c:75:29: warning: symbol 'tcp_fastopen_alloc_ctx' was not declared. Should it be static? Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- net/ipv4/tcp_fastopen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)