Skip to contentSkip to conversation

: Compilation fix for include/linux/netdevice.h.

PATCH Applied Denis V. Lunev 5 participants 8 messages Mar 26, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 : Compilation fix for include/linux/netdevice.h.

Commit commit c346dca10840a874240c78efe3f39acf4312a1f2 ([NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS) breaks compilation with CONFIG_NET_NS set.

Fix the typo.

---
 include/linux/netdevice.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/linux/netdevice.h +1 -1
index d146be4..06ca84d 100644
@@ -756,7 +756,7 @@ static inline
 void dev_net_set(struct net_device *dev, const struct net *net)
 {
 #ifdef CONFIG_NET_NS
-	dev->nd_dev = net;
+	dev->nd_net = net;
 #endif
 }
 
Signature · 1 line
1.5.3.rc5
#1 lore raw

PATCH 2/2 : Compilation warnings under CONFIG_NET_NS.

Recent commits from YOSHIFUJI Hideaki <[email protected]> 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.

---
 include/linux/netdevice.h        |    2 +-
 include/net/inet_timewait_sock.h |    2 +-
 include/net/sock.h               |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
include/linux/netdevice.h +1 -1
index 06ca84d..15fa84a 100644
@@ -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;
include/net/inet_timewait_sock.h +1 -1
index 07fe0d1..95c660c 100644
@@ -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;
include/net/sock.h +1 -1
index 7e0d4a0..1c9d059 100644
@@ -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;
Signature · 1 line
1.5.3.rc5
maintainer
#2 lore raw

Re: [PATCH 2/2 net-2.6.26] [NETNS]: Compilation warnings under CONFIG_NET_NS.

In reply to Denis V. Lunev

From: "Denis V. Lunev" <[email protected]>
Date: Wed, 26 Mar 2008 10:40:59 +0300

Quoted 9 lines

Recent commits from YOSHIFUJI Hideaki <[email protected]> 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.

Also applied, thanks a lot.

#4 lore raw
In reply to David Miller
Quoted 7 lines · David Miller

From: "Denis V. Lunev" <[email protected]>
Date: Wed, 26 Mar 2008 10:40:58 +0300

Quoted 4 lines

Commit commit c346dca10840a874240c78efe3f39acf4312a1f2 ([NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS) breaks compilation with CONFIG_NET_NS set.

Quoted 7 lines
Quoted 3 lines

Fix the typo.

Applied.

Too bad allmodconfig doesn't enable things which are y/n only.

We are in trouble for this right now :( there we do not work with SYSFS enabled right now.

#5 lore raw
In reply to David Miller

In article <[email protected]> (at Wed, 26 Mar 2008 00:47:42 -0700 (PDT)), David Miller <[email protected]> says:

Quoted 7 lines

From: "Denis V. Lunev" <[email protected]>
Date: Wed, 26 Mar 2008 10:40:58 +0300

Quoted 4 lines

Commit commit c346dca10840a874240c78efe3f39acf4312a1f2 ([NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS) breaks compilation with CONFIG_NET_NS set.

Quoted 7 lines
Quoted 3 lines

Fix the typo.

Applied.

Too bad allmodconfig doesn't enable things which are y/n only.

Sorry for the typo.

Unfortunately, NET_NS depends on !SYSFS,
so allyesconfig might not help...

--yoshfuji

#6 lore raw
Quoted 12 lines · YOSHIFUJI Hideaki / 吉藤英明

In article <[email protected]> (at Wed, 26 Mar 2008 00:47:42 -0700 (PDT)), David Miller <[email protected]> says:

Quoted 10 lines

From: "Denis V. Lunev" <[email protected]>
Date: Wed, 26 Mar 2008 10:40:58 +0300

Quoted 7 lines

Commit commit c346dca10840a874240c78efe3f39acf4312a1f2 ([NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS) breaks compilation with CONFIG_NET_NS set.

Fix the typo.

Quoted 8 lines
Quoted 3 lines

Applied.

Too bad allmodconfig doesn't enable things which are y/n only.

Sorry for the typo.

Unfortunately, NET_NS depends on !SYSFS,
so allyesconfig might not help...

Eric Biederman told us he has community acceptance for his approach and he will push sysfs per namespace in a few weeks.

#7 lore raw
In reply to David Miller
Quoted 7 lines · On Wednesday 26 March 2008 10:47:42 David Miller wrote:

From: "Denis V. Lunev" <[email protected]>
Date: Wed, 26 Mar 2008 10:40:58 +0300

Quoted 4 lines

Commit commit c346dca10840a874240c78efe3f39acf4312a1f2 ([NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS) breaks compilation with CONFIG_NET_NS set.

Quoted 7 lines
Quoted 3 lines

Fix the typo.

Applied.

Too bad allmodconfig doesn't enable things which are y/n only.

Right now NET_NS can be more or less reliably selected via:

echo '# CONFIG_SYSFS is not set' >foo
echo 'CONFIG_NET_NS=y' >>foo
KCONFIG_ALLCONFIG=foo make allmodconfig

But this trick a) doesn't work with some options, b) likely to break when someone will start selecting SYSFS.