aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ip.h
diff options
context:
space:
mode:
authorCong Wang <amwang@redhat.com>2013-09-01 22:06:53 -0400
committerDavid S. Miller <davem@davemloft.net>2013-09-03 00:00:50 -0400
commit5a17a390de7bdbcfff9b8f344273a886ca4cf8bf (patch)
tree9e5d0a9ab50d7700b8a92b6cce9094148f4043a1 /include/net/ip.h
parent660d98cae0a474887bb5d66e60422addb4c6532c (diff)
net: make snmp_mib_free static inline
Fengguang reported: net/built-in.o: In function `in6_dev_finish_destroy': (.text+0x4ca7d): undefined reference to `snmp_mib_free' this is due to snmp_mib_free() is defined when CONFIG_INET is enabled, but in6_dev_finish_destroy() is now moved to core kernel. I think snmp_mib_free() is small enough to be inlined, so just make it static inline. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r--include/net/ip.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index a68f838a132c..48f55979d842 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -194,7 +194,17 @@ static inline u64 snmp_fold_field64(void __percpu *mib[], int offt, size_t syncp
194} 194}
195#endif 195#endif
196extern int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align); 196extern int snmp_mib_init(void __percpu *ptr[2], size_t mibsize, size_t align);
197extern void snmp_mib_free(void __percpu *ptr[2]); 197
198static inline void snmp_mib_free(void __percpu *ptr[SNMP_ARRAY_SZ])
199{
200 int i;
201
202 BUG_ON(ptr == NULL);
203 for (i = 0; i < SNMP_ARRAY_SZ; i++) {
204 free_percpu(ptr[i]);
205 ptr[i] = NULL;
206 }
207}
198 208
199extern struct local_ports { 209extern struct local_ports {
200 seqlock_t lock; 210 seqlock_t lock;