[PATCH 17/46] kernel: Move prototype declaration to appropriate header file from kernel/stop_machine.c

From: Rashika Kheria
Date: Thu Feb 27 2014 - 06:51:21 EST


Move prototype declaration to header file include/linux/sched.h from
kernel/stop_machine.c because they are used by more than one file.

This eliminates the following warning in kernel/sched/core.c:
kernel/sched/core.c:851:6: warning: no previous prototype for âsched_set_stop_taskâ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@xxxxxxxxx>
Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
---
include/linux/sched.h | 2 +-
kernel/stop_machine.c | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index a781dec..fac6f9d 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -170,7 +170,6 @@ extern unsigned long nr_iowait(void);
extern unsigned long nr_iowait_cpu(int cpu);
extern unsigned long this_cpu_load(void);

-
extern void calc_global_load(unsigned long ticks);
extern void update_cpu_load_nohz(void);

@@ -187,6 +186,7 @@ extern void proc_sched_set_task(struct task_struct *p);
extern void
print_cfs_rq(struct seq_file *m, int cpu, struct cfs_rq *cfs_rq);
#endif
+void sched_set_stop_task(int cpu, struct task_struct *stop);

/*
* Task state bitmask. NOTE! These bits are also
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 84571e0..d9a5c80 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -485,8 +485,6 @@ repeat:
}
}

-extern void sched_set_stop_task(int cpu, struct task_struct *stop);
-
static void cpu_stop_create(unsigned int cpu)
{
sched_set_stop_task(cpu, per_cpu(cpu_stopper_task, cpu));
--
1.7.9.5

--
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/