Commit b962abdc authored by Julian Anastasov's avatar Julian Anastasov Committed by Simon Horman

ipvs: fix some sparse warnings

Add missing __percpu annotations and make ip_vs_net_id static.
Signed-off-by: default avatarJulian Anastasov <ja@ssi.bg>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
parent e9836f24
...@@ -459,7 +459,7 @@ struct ip_vs_estimator { ...@@ -459,7 +459,7 @@ struct ip_vs_estimator {
struct ip_vs_stats { struct ip_vs_stats {
struct ip_vs_stats_user ustats; /* statistics */ struct ip_vs_stats_user ustats; /* statistics */
struct ip_vs_estimator est; /* estimator */ struct ip_vs_estimator est; /* estimator */
struct ip_vs_cpu_stats *cpustats; /* per cpu counters */ struct ip_vs_cpu_stats __percpu *cpustats; /* per cpu counters */
spinlock_t lock; /* spin lock */ spinlock_t lock; /* spin lock */
struct ip_vs_stats_user ustats0; /* reset values */ struct ip_vs_stats_user ustats0; /* reset values */
}; };
......
...@@ -69,10 +69,7 @@ EXPORT_SYMBOL(ip_vs_conn_put); ...@@ -69,10 +69,7 @@ EXPORT_SYMBOL(ip_vs_conn_put);
EXPORT_SYMBOL(ip_vs_get_debug_level); EXPORT_SYMBOL(ip_vs_get_debug_level);
#endif #endif
int ip_vs_net_id __read_mostly; static int ip_vs_net_id __read_mostly;
#ifdef IP_VS_GENERIC_NETNS
EXPORT_SYMBOL(ip_vs_net_id);
#endif
/* netns cnt used for uniqueness */ /* netns cnt used for uniqueness */
static atomic_t ipvs_netns_cnt = ATOMIC_INIT(0); static atomic_t ipvs_netns_cnt = ATOMIC_INIT(0);
...@@ -1181,9 +1178,6 @@ ip_vs_out(unsigned int hooknum, struct sk_buff *skb, int af) ...@@ -1181,9 +1178,6 @@ ip_vs_out(unsigned int hooknum, struct sk_buff *skb, int af)
iph.len)))) { iph.len)))) {
#ifdef CONFIG_IP_VS_IPV6 #ifdef CONFIG_IP_VS_IPV6
if (af == AF_INET6) { if (af == AF_INET6) {
struct net *net =
dev_net(skb_dst(skb)->dev);
if (!skb->dev) if (!skb->dev)
skb->dev = net->loopback_dev; skb->dev = net->loopback_dev;
icmpv6_send(skb, icmpv6_send(skb,
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
* Make a summary from each cpu * Make a summary from each cpu
*/ */
static void ip_vs_read_cpu_stats(struct ip_vs_stats_user *sum, static void ip_vs_read_cpu_stats(struct ip_vs_stats_user *sum,
struct ip_vs_cpu_stats *stats) struct ip_vs_cpu_stats __percpu *stats)
{ {
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment