Re: [uml-devel] [PATCH 2/4] UML - tidy process.c

From: Blaisorblade
Date: Tue Apr 03 2007 - 13:50:46 EST


On lunedì 2 aprile 2007, Jeff Dike wrote:
> Clean up arch/um/kernel/process.c -
> lots of return(x); -> return x; conversions
> a number of the small functions are either unused, in which
> case they are gone, along any declarations in a header, or could be
> made static.

> current_pid is ifdefed on CONFIG_MODE_TT and its declaration
> is ifdefed on both CONFIG_MODE_TT and UML_CONFIG_MODE_TT because we
> don't know whether it's being used in a userspace or kernel file.

Please, simply include uml-config.h and use just UML_CONFIG_MODE_TT.

> Index: linux-2.6.21-mm/arch/um/include/kern_util.h
> ===================================================================
> --- linux-2.6.21-mm.orig/arch/um/include/kern_util.h 2007-03-30
> 16:01:21.000000000 -0400 +++
> linux-2.6.21-mm/arch/um/include/kern_util.h 2007-04-02 12:07:48.000000000
> -0400 @@ -33,7 +33,9 @@ extern int nsyscalls;
> UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1)
>
> extern int kernel_fork(unsigned long flags, int (*fn)(void *), void *
> arg); +#if defined(CONFIG_MODE_TT) || defined(UML_CONFIG_MODE_TT)
> extern unsigned long stack_sp(unsigned long page);
> +#endif
> extern int kernel_thread_proc(void *data);
> extern void syscall_segv(int sig);
> extern int current_pid(void);



--
Inform me of my mistakes, so I can add them to my list!
Paolo Giarrusso, aka Blaisorblade
http://www.user-mode-linux.org/~blaisorblade
-
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/