2003-09-22 19:46:11

by Remi Colinet

[permalink] [raw]
Subject: [Patch] Compile fix for 2.6.0-test5-mm4 in net/atm/proc.c

Hi,

--- linux-2.6.0-test5-mm4/net/atm/proc.c 2003-09-22
21:42:09.000000000 +0200
+++ linux-2.6.0-test5-mm4-new/net/atm/proc.c 2003-09-22
21:44:24.000000000 +0200
@@ -192,7 +192,9 @@
goto out_kfree;

state->family = family;
+#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
state->clip_info = try_atm_clip_ops();
+#endif

seq = file->private_data;
seq->private = state;

This patch fixes the following compile error :

CC arch/i386/lib/usercopy.o
AR arch/i386/lib/lib.a
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
net/built-in.o: In function `__vcc_seq_open':
/usr/src/mm/net/atm/proc.c:195: undefined reference to `try_atm_clip_ops'
make: *** [.tmp_vmlinux1] Error 1

Remi



Subject: Re: [Patch] Compile fix for 2.6.0-test5-mm4 in net/atm/proc.c

In message <[email protected]>,Remi Colinet writes:
>
> state->family = family;
>+#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
> state->clip_info = try_atm_clip_ops();
>+#endif
>

instead of doing this, it would probably be cleaner to put the
ifdef inside the clip header file and just return 0 when !CLIP.

dave, can you apply this to 2.6?

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1446 -> 1.1447
# net/atm/proc.c 1.29 -> 1.30
# include/net/atmclip.h 1.2 -> 1.3
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/09/23 [email protected] 1.1447
# [ATM]: if !CLIP try_atm_clip_ops() should always fail
# --------------------------------------------
#
diff -Nru a/include/net/atmclip.h b/include/net/atmclip.h
--- a/include/net/atmclip.h Tue Sep 23 08:48:18 2003
+++ b/include/net/atmclip.h Tue Sep 23 08:48:18 2003
@@ -67,7 +67,15 @@
};

void atm_clip_ops_set(struct atm_clip_ops *);
+#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
int try_atm_clip_ops(void);
+#else
+static inline int try_atm_clip_ops(void)
+{
+ return 0;
+}
+#endif
+

extern struct neigh_table *clip_tbl_hook;
extern struct atm_clip_ops *atm_clip_ops;
diff -Nru a/net/atm/proc.c b/net/atm/proc.c
--- a/net/atm/proc.c Tue Sep 23 08:48:18 2003
+++ b/net/atm/proc.c Tue Sep 23 08:48:18 2003
@@ -32,10 +32,8 @@
#include "common.h" /* atm_proc_init prototype */
#include "signaling.h" /* to get sigd - ugly too */

-#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
#include <net/atmclip.h>
#include "ipcommon.h"
-#endif

#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
#include "lec.h"

2003-09-23 12:57:06

by John Levon

[permalink] [raw]
Subject: Re: [Patch] Compile fix for 2.6.0-test5-mm4 in net/atm/proc.c

On Tue, Sep 23, 2003 at 08:50:52AM -0400, chas williams wrote:

> instead of doing this, it would probably be cleaner to put the
> ifdef inside the clip header file and just return 0 when !CLIP.

What are your plans with mine and Mitchell's stuff that removes all this
ops crap altogether ?

The patch series works, as far as I know.

regards
john

--
Khendon's Law:
If the same point is made twice by the same person, the thread is over.

Subject: Re: [Patch] Compile fix for 2.6.0-test5-mm4 in net/atm/proc.c

In message <[email protected]>,John Levon writes:
>What are your plans with mine and Mitchell's stuff that removes all this
>ops crap altogether ?

working on testing it. sorry but i havent had much time with the
end of the gov't fiscal year coming up. in the meantime this short
little patch should solve things in the meantime.