From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753175AbdBFNhz (ORCPT ); Mon, 6 Feb 2017 08:37:55 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:32994 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752627AbdBFNbN (ORCPT ); Mon, 6 Feb 2017 08:31:13 -0500 From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Andrew Morton , Linus Torvalds , Mike Galbraith , Oleg Nesterov , Peter Zijlstra , Thomas Gleixner Subject: [PATCH 55/89] sched/core: Clean up structure predeclarations and remove stale entries Date: Mon, 6 Feb 2017 14:28:58 +0100 Message-Id: <1486387772-18837-56-git-send-email-mingo@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486387772-18837-1-git-send-email-mingo@kernel.org> References: <1486387772-18837-1-git-send-email-mingo@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Most of the structure predeclarations were at the head of sched.h, but not all of them - there were a number of lines spread around sched.h, in random places. Move them to the head, and also sort them alphabetically. Also, while at it: - remove a stray #include - remove runqueue_is_locked() prototype, the function does not exist anymore Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Thomas Gleixner Cc: Linus Torvalds Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- include/linux/sched.h | 60 +++++++++++++++++++++++------------------------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index b7ed84a2487f..def67d45a17f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -25,24 +25,35 @@ #include -struct sched_attr; -struct sched_param; - -struct futex_pi_state; -struct robust_list_head; +/* task_struct member predeclarations: */ +struct audit_context; +struct autogroup; +struct backing_dev_info; struct bio_list; -struct fs_struct; -struct perf_event_context; struct blk_plug; +struct cfs_rq; struct filename; +struct fs_struct; +struct futex_pi_state; +struct io_context; +struct mempolicy; struct nameidata; - -struct signal_struct; -struct sighand_struct; - +struct nsproxy; +struct perf_event_context; +struct pid_namespace; +struct pipe_inode_info; +struct rcu_node; +struct reclaim_state; +struct robust_list_head; +struct sched_attr; +struct sched_param; struct seq_file; -struct cfs_rq; +struct sighand_struct; +struct signal_struct; +struct task_delay_info; struct task_group; +struct task_struct; +struct uts_namespace; /* * Task state bitmask. NOTE! These bits are also @@ -157,15 +168,11 @@ struct task_group; /* Task command name length */ #define TASK_COMM_LEN 16 -struct task_struct; - extern void sched_init(void); extern void sched_init_smp(void); extern cpumask_var_t cpu_isolated_map; -extern int runqueue_is_locked(int cpu); - extern void cpu_init (void); extern void trap_init(void); extern void update_process_times(int user); @@ -185,8 +192,6 @@ extern void io_schedule_finish(int token); extern long io_schedule_timeout(long timeout); extern void io_schedule(void); -struct nsproxy; - /** * struct prev_cputime - snaphsot of system and user cputime * @utime: time spent in user mode @@ -288,12 +293,6 @@ struct thread_group_cputimer { bool checking_timer; }; -#include -struct autogroup; - -struct backing_dev_info; -struct reclaim_state; - #ifdef CONFIG_SCHED_INFO struct sched_info { /* cumulative counters */ @@ -306,8 +305,6 @@ struct sched_info { }; #endif /* CONFIG_SCHED_INFO */ -struct task_delay_info; - static inline int sched_info_on(void) { #ifdef CONFIG_SCHEDSTATS @@ -334,20 +331,12 @@ void force_schedstat_enabled(void); # define SCHED_FIXEDPOINT_SHIFT 10 # define SCHED_FIXEDPOINT_SCALE (1L << SCHED_FIXEDPOINT_SHIFT) -struct io_context; /* See blkdev.h */ - - #ifdef ARCH_HAS_PREFETCH_SWITCH_STACK extern void prefetch_stack(struct task_struct *t); #else static inline void prefetch_stack(struct task_struct *t) { } #endif -struct audit_context; /* See audit.c */ -struct mempolicy; -struct pipe_inode_info; -struct uts_namespace; - struct load_weight { unsigned long weight; u32 inv_weight; @@ -556,7 +545,6 @@ union rcu_special { } b; /* Bits. */ u32 s; /* Set of bits. */ }; -struct rcu_node; enum perf_event_task_context { perf_invalid_context = -1, @@ -1119,8 +1107,6 @@ static inline struct pid *task_session(struct task_struct *task) return task->group_leader->pids[PIDTYPE_SID].pid; } -struct pid_namespace; - /* * the helpers to get the task's different pids as they are seen * from various namespaces -- 2.7.4