Re: 2.6.8-rc3-mm1: PROC_FS=n link errors

From: William Lee Irwin III
Date: Fri Aug 06 2004 - 15:47:11 EST


On Fri, Aug 06, 2004 at 09:58:05PM +0200, Adrian Bunk wrote:
>> Theses patches cause the following link errors with CONFIG_PROC_FS=n:
>> <-- snip -->
>> LD .tmp_vmlinux1
>> arch/i386/kernel/built-in.o(.text+0x45ce): In function `init_irq_proc':
>> : undefined reference to `create_prof_cpu_mask'

On Fri, Aug 06, 2004 at 01:24:14PM -0700, William Lee Irwin III wrote:
> Ugh. Okay, here goes:
> Fix up compile with CONFIG_PROC_FS=n. Accomplish this by conditionally
> declaring create_prof_cpu_mask(), privatizing create_proc_profile(),
> and unconditionally including profile_hit() and profile_tick().

Fix up create_proc_profile() to actually return values, and also
s/unsigned int/atomic_t/ in one last place with a casting to atomic_t
hangover.


-- wli

Index: mm1-2.6.8-rc3/kernel/profile.c
===================================================================
--- mm1-2.6.8-rc3.orig/kernel/profile.c 2004-08-06 13:12:19.567689928 -0700
+++ mm1-2.6.8-rc3/kernel/profile.c 2004-08-06 13:21:00.284528936 -0700
@@ -292,11 +292,12 @@
struct proc_dir_entry *entry;

if (!prof_on)
- return;
+ return 0;
if (!(entry = create_proc_entry("profile", S_IWUSR | S_IRUGO, NULL)))
- return;
+ return 0;
entry->proc_fops = &proc_profile_operations;
- entry->size = (1+prof_len) * sizeof(unsigned int);
+ entry->size = (1+prof_len) * sizeof(atomic_t);
+ return 0;
}
module_init(create_proc_profile);
#endif /* CONFIG_PROC_FS */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/