* 2.6: DECNET compile errors with SYSCTL=n
@ 2004-08-11 22:40 Adrian Bunk
2004-08-12 0:42 ` YOSHIFUJI Hideaki / 吉藤英明
0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2004-08-11 22:40 UTC (permalink / raw)
To: Steve Whitehouse, Eduardo Marcelo Serrat; +Cc: linux-kernel, davem, netdev
I'm getting the following compile errors in 2.6.8-rc4-mm1 (but it
doesn't seem to be specific to -mm) with CONFIG_SYSCTL=n:
<-- snip -->
...
LD .tmp_vmlinux1
net/built-in.o(.text+0x1685e9): In function `dn_route_output_slow':
: undefined reference to `dn_dev_get_default'
net/built-in.o(.text+0x16a749): In function `dn_dev_bind_default':
: undefined reference to `dn_dev_get_default'
net/built-in.o(.text+0x16a85b): In function `dn_send_endnode_hello':
: undefined reference to `mtu2blksize'
net/built-in.o(.text+0x16a9f2): In function `dn_send_router_hello':
: undefined reference to `mtu2blksize'
net/built-in.o(.text+0x16aa08): In function `dn_send_router_hello':
: undefined reference to `mtu2blksize'
net/built-in.o(.text+0x16aaeb): In function `dn_send_router_hello':
: undefined reference to `mtu2blksize'
net/built-in.o(.text+0x16b1a4): In function `dn_dev_up':
: undefined reference to `dn_dev_set_default'
net/built-in.o(.text+0x16b1e8): In function `dn_dev_delete':
: undefined reference to `dn_dev_check_default'
net/built-in.o(.text+0x16b6b8): In function `dn_dev_seq_show':
: undefined reference to `mtu2blksize'
make: *** [.tmp_vmlinux1] Error 1
<-- snip -->
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6: DECNET compile errors with SYSCTL=n
2004-08-11 22:40 2.6: DECNET compile errors with SYSCTL=n Adrian Bunk
@ 2004-08-12 0:42 ` YOSHIFUJI Hideaki / 吉藤英明
2004-08-12 16:06 ` Adrian Bunk
2004-08-18 21:48 ` David S. Miller
0 siblings, 2 replies; 4+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2004-08-12 0:42 UTC (permalink / raw)
To: bunk, davem; +Cc: SteveW, emserrat, linux-kernel, netdev, yoshfuji
Hello.
In article <20040811224015.GP26174@fs.tum.de> (at Thu, 12 Aug 2004 00:40:15 +0200), Adrian Bunk <bunk@fs.tum.de> says:
> I'm getting the following compile errors in 2.6.8-rc4-mm1 (but it
> doesn't seem to be specific to -mm) with CONFIG_SYSCTL=n:
>
> <-- snip -->
>
> ...
> LD .tmp_vmlinux1
> net/built-in.o(.text+0x1685e9): In function `dn_route_output_slow':
> : undefined reference to `dn_dev_get_default'
:
Please try this patch. Thanks.
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
===== net/decnet/dn_dev.c 1.23 vs edited =====
--- 1.23/net/decnet/dn_dev.c 2004-08-08 15:43:41 +09:00
+++ edited/net/decnet/dn_dev.c 2004-08-12 09:34:56 +09:00
@@ -247,21 +247,6 @@
}, {0}}
};
-static inline __u16 mtu2blksize(struct net_device *dev)
-{
- u32 blksize = dev->mtu;
- if (blksize > 0xffff)
- blksize = 0xffff;
-
- if (dev->type == ARPHRD_ETHER ||
- dev->type == ARPHRD_PPP ||
- dev->type == ARPHRD_IPGRE ||
- dev->type == ARPHRD_LOOPBACK)
- blksize -= 2;
-
- return (__u16)blksize;
-}
-
static void dn_dev_sysctl_register(struct net_device *dev, struct dn_dev_parms *parms)
{
struct dn_dev_sysctl_table *t;
@@ -314,52 +299,6 @@
}
}
-struct net_device *dn_dev_get_default(void)
-{
- struct net_device *dev;
- read_lock(&dndev_lock);
- dev = decnet_default_device;
- if (dev) {
- if (dev->dn_ptr)
- dev_hold(dev);
- else
- dev = NULL;
- }
- read_unlock(&dndev_lock);
- return dev;
-}
-
-int dn_dev_set_default(struct net_device *dev, int force)
-{
- struct net_device *old = NULL;
- int rv = -EBUSY;
- if (!dev->dn_ptr)
- return -ENODEV;
- write_lock(&dndev_lock);
- if (force || decnet_default_device == NULL) {
- old = decnet_default_device;
- decnet_default_device = dev;
- rv = 0;
- }
- write_unlock(&dndev_lock);
- if (old)
- dev_put(dev);
- return rv;
-}
-
-static void dn_dev_check_default(struct net_device *dev)
-{
- write_lock(&dndev_lock);
- if (dev == decnet_default_device) {
- decnet_default_device = NULL;
- } else {
- dev = NULL;
- }
- write_unlock(&dndev_lock);
- if (dev)
- dev_put(dev);
-}
-
static int dn_forwarding_proc(ctl_table *table, int write,
struct file *filep,
void __user *buffer,
@@ -454,6 +393,21 @@
#endif /* CONFIG_SYSCTL */
+static inline __u16 mtu2blksize(struct net_device *dev)
+{
+ u32 blksize = dev->mtu;
+ if (blksize > 0xffff)
+ blksize = 0xffff;
+
+ if (dev->type == ARPHRD_ETHER ||
+ dev->type == ARPHRD_PPP ||
+ dev->type == ARPHRD_IPGRE ||
+ dev->type == ARPHRD_LOOPBACK)
+ blksize -= 2;
+
+ return (__u16)blksize;
+}
+
static struct dn_ifaddr *dn_dev_alloc_ifa(void)
{
struct dn_ifaddr *ifa;
@@ -633,6 +587,52 @@
if (copy_to_user(arg, ifr, DN_IFREQ_SIZE))
ret = -EFAULT;
goto done;
+}
+
+struct net_device *dn_dev_get_default(void)
+{
+ struct net_device *dev;
+ read_lock(&dndev_lock);
+ dev = decnet_default_device;
+ if (dev) {
+ if (dev->dn_ptr)
+ dev_hold(dev);
+ else
+ dev = NULL;
+ }
+ read_unlock(&dndev_lock);
+ return dev;
+}
+
+int dn_dev_set_default(struct net_device *dev, int force)
+{
+ struct net_device *old = NULL;
+ int rv = -EBUSY;
+ if (!dev->dn_ptr)
+ return -ENODEV;
+ write_lock(&dndev_lock);
+ if (force || decnet_default_device == NULL) {
+ old = decnet_default_device;
+ decnet_default_device = dev;
+ rv = 0;
+ }
+ write_unlock(&dndev_lock);
+ if (old)
+ dev_put(dev);
+ return rv;
+}
+
+static void dn_dev_check_default(struct net_device *dev)
+{
+ write_lock(&dndev_lock);
+ if (dev == decnet_default_device) {
+ decnet_default_device = NULL;
+ } else {
+ dev = NULL;
+ }
+ write_unlock(&dndev_lock);
+ if (dev)
+ dev_put(dev);
}
static struct dn_dev *dn_dev_by_index(int ifindex)
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6: DECNET compile errors with SYSCTL=n
2004-08-12 0:42 ` YOSHIFUJI Hideaki / 吉藤英明
@ 2004-08-12 16:06 ` Adrian Bunk
2004-08-18 21:48 ` David S. Miller
1 sibling, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2004-08-12 16:06 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / ?$B5HF#1QL@
Cc: davem, SteveW, emserrat, linux-kernel, netdev
On Thu, Aug 12, 2004 at 09:42:06AM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
> Hello.
>
> In article <20040811224015.GP26174@fs.tum.de> (at Thu, 12 Aug 2004 00:40:15 +0200), Adrian Bunk <bunk@fs.tum.de> says:
>
> > I'm getting the following compile errors in 2.6.8-rc4-mm1 (but it
> > doesn't seem to be specific to -mm) with CONFIG_SYSCTL=n:
> >
> > <-- snip -->
> >
> > ...
> > LD .tmp_vmlinux1
> > net/built-in.o(.text+0x1685e9): In function `dn_route_output_slow':
> > : undefined reference to `dn_dev_get_default'
> :
>
> Please try this patch. Thanks.
>...
Thanks, I can confirm it fixes the compilation.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2.6: DECNET compile errors with SYSCTL=n
2004-08-12 0:42 ` YOSHIFUJI Hideaki / 吉藤英明
2004-08-12 16:06 ` Adrian Bunk
@ 2004-08-18 21:48 ` David S. Miller
1 sibling, 0 replies; 4+ messages in thread
From: David S. Miller @ 2004-08-18 21:48 UTC (permalink / raw)
To: yoshfuji; +Cc: bunk, SteveW, emserrat, linux-kernel, netdev
On Thu, 12 Aug 2004 09:42:06 +0900 (JST)
YOSHIFUJI Hideaki / ^[$B5HF#1QL@^[(B <yoshfuji@linux-ipv6.org> wrote:
> Please try this patch. Thanks.
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-08-18 21:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-11 22:40 2.6: DECNET compile errors with SYSCTL=n Adrian Bunk
2004-08-12 0:42 ` YOSHIFUJI Hideaki / 吉藤英明
2004-08-12 16:06 ` Adrian Bunk
2004-08-18 21:48 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).