From 9e22a07206e296a2fe5c558bc1ee132f38fe982a Mon Sep 17 00:00:00 2001 From: William Lee Irwin III Date: Thu, 26 Aug 2004 20:31:54 -0700 Subject: [PATCH] [PATCH] make private profile state static Make the various bits of state no longer used anywhere else static to kernel/profile.c Signed-off-by: William Irwin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/profile.h | 10 ---------- init/main.c | 2 -- kernel/profile.c | 12 ++++++------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/include/linux/profile.h b/include/linux/profile.h index 603761004085b..222790cd4d169 100644 --- a/include/linux/profile.h +++ b/include/linux/profile.h @@ -15,9 +15,6 @@ struct proc_dir_entry; struct pt_regs; -/* parse command line */ -int __init profile_setup(char * str); - /* init basic kernel profiler */ void __init profile_init(void); void profile_tick(int, struct pt_regs *); @@ -28,13 +25,6 @@ void create_prof_cpu_mask(struct proc_dir_entry *); #define create_prof_cpu_mask(x) do { (void)(x); } while (0) #endif -extern unsigned int * prof_buffer; -extern unsigned long prof_len; -extern unsigned long prof_shift; -extern int prof_on; -extern cpumask_t prof_cpu_mask; - - enum profile_type { EXIT_TASK, EXIT_MMAP, diff --git a/init/main.c b/init/main.c index 5f9dec5bae423..1cd32a1cdf6cb 100644 --- a/init/main.c +++ b/init/main.c @@ -156,8 +156,6 @@ static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, }; char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; static const char *panic_later, *panic_param; -__setup("profile=", profile_setup); - static int __init obsolete_checksetup(char *line) { struct obs_kernel_param *p; diff --git a/kernel/profile.c b/kernel/profile.c index 7c258229a167e..e7b44fa94e9da 100644 --- a/kernel/profile.c +++ b/kernel/profile.c @@ -12,13 +12,12 @@ #include #include -unsigned int * prof_buffer; -unsigned long prof_len; -unsigned long prof_shift; -int prof_on; -cpumask_t prof_cpu_mask = CPU_MASK_ALL; +static unsigned int *prof_buffer; +static unsigned long prof_len, prof_shift; +static int prof_on; +static cpumask_t prof_cpu_mask = CPU_MASK_ALL; -int __init profile_setup(char * str) +static int __init profile_setup(char * str) { int par; @@ -36,6 +35,7 @@ int __init profile_setup(char * str) } return 1; } +__setup("profile=", profile_setup); void __init profile_init(void) -- 2.53.0