diff options
author | Ying Xue <ying.xue@windriver.com> | 2015-08-19 15:46:17 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-19 17:37:51 -0700 |
commit | 824e7383e92815cb591793c74cc836aa5165f7f8 (patch) | |
tree | a6b56b9a67b8124895f9261a047c99830533bcb9 /drivers/net/vrf.c | |
parent | def63be85fe774477fb66043003e5b2ee748c4fa (diff) | |
download | linux-stable-824e7383e92815cb591793c74cc836aa5165f7f8.tar.gz linux-stable-824e7383e92815cb591793c74cc836aa5165f7f8.tar.bz2 linux-stable-824e7383e92815cb591793c74cc836aa5165f7f8.zip |
lwtunnel: Fix the sparse warnings in fib_encap_match
When CONFIG_LWTUNNEL config is not enabled, the lwtstate_free() is not
declared in lwtunnel.h at all. However, even in this case, the function
is still referenced in fib_semantics.c so that there appears the
following sparse warnings:
net/ipv4/fib_semantics.c:553:17: error: undefined identifier 'lwtstate_free'
CC net/ipv4/fib_semantics.o
net/ipv4/fib_semantics.c: In function ‘fib_encap_match’:
net/ipv4/fib_semantics.c:553:3: error: implicit declaration of function ‘lwtstate_free’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[1]: *** [net/ipv4/fib_semantics.o] Error 1
make: *** [net/ipv4/fib_semantics.o] Error 2
To eliminate the error, we define an empty function for lwtstate_free()
in lwtunnel.h when CONFIG_LWTUNNEL is disabled.
Fixes: df383e6240ef ("lwtunnel: fix memory leak")
Cc: Jiri Benc <jbenc@redhat.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vrf.c')
0 files changed, 0 insertions, 0 deletions