OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 2/2 net-2.6.26] [NETNS]: Compilation warnings under CONFIG_NET_NS.
[PATCH 2/2 net-2.6.26] [NETNS]: Compilation warnings under CONFIG_NET_NS. [message #28656] Wed, 26 March 2008 07:40 Go to next message
den is currently offline  den
Messages: 494
Registered: December 2005
Senior Member
Recent commits from YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
have been introduced a several compilation warnings
'assignment discards qualifiers from pointer target type'
due to extra const modifier in the inline call parameters of
{dev|sock|twsk}_net_set.

Drop it.

Signed-off-by: Denis V. Lunev <den@openvz.org>
---
 include/linux/netdevice.h        |    2 +-
 include/net/inet_timewait_sock.h |    2 +-
 include/net/sock.h               |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 06ca84d..15fa84a 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -753,7 +753,7 @@ struct net *dev_net(const struct net_device *dev)
 }
 
 static inline
-void dev_net_set(struct net_device *dev, const struct net *net)
+void dev_net_set(struct net_device *dev, struct net *net)
 {
 #ifdef CONFIG_NET_NS
 	dev->nd_net = net;
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 07fe0d1..95c660c 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -219,7 +219,7 @@ struct net *twsk_net(const struct inet_timewait_sock *twsk)
 }
 
 static inline
-void twsk_net_set(struct inet_timewait_sock *twsk, const struct net *net)
+void twsk_net_set(struct inet_timewait_sock *twsk, struct net *net)
 {
 #ifdef CONFIG_NET_NS
 	twsk->tw_net = net;
diff --git a/include/net/sock.h b/include/net/sock.h
index 7e0d4a0..1c9d059 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1358,7 +1358,7 @@ struct net *sock_net(const struct sock *sk)
 }
 
 static inline
-void sock_net_set(struct sock *sk, const struct net *net)
+void sock_net_set(struct sock *sk, struct net *net)
 {
 #ifdef CONFIG_NET_NS
 	sk->sk_net = net;
-- 
1.5.3.rc5
Re: [PATCH 2/2 net-2.6.26] [NETNS]: Compilation warnings under CONFIG_NET_NS. [message #28662 is a reply to message #28656] Wed, 26 March 2008 07:48 Go to previous message
davem is currently offline  davem
Messages: 463
Registered: February 2006
Senior Member
From: "Denis V. Lunev" <den@openvz.org>
Date: Wed, 26 Mar 2008 10:40:59 +0300

> Recent commits from YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
> have been introduced a several compilation warnings
> 'assignment discards qualifiers from pointer target type'
> due to extra const modifier in the inline call parameters of
> {dev|sock|twsk}_net_set.
> 
> Drop it.
> 
> Signed-off-by: Denis V. Lunev <den@openvz.org>

Also applied, thanks a lot.
Previous Topic: [PATCH] fix spurious EBUSY on memory cgroup removal
Next Topic: [PATCH net-2.6.26 1/4][NETNS][ICMP]: Register pernet subsys to make ICMP sysctls per-net.
Goto Forum:
  


Current Time: Fri Jul 19 20:36:18 GMT 2024

Total time taken to generate the page: 0.02250 seconds