[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220429025852.49657-1-kunyu@nfschina.com>
Date: Fri, 29 Apr 2022 10:58:52 +0800
From: Li kunyu <kunyu@...china.com>
To: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com
Cc: linux-kernel@...r.kernel.org, Li kunyu <kunyu@...china.com>
Subject: [PATCH RESEND] sched: Optimize unused integer return values
sched: Optimize unused integer return values
Signed-off-by: Li kunyu<kunyu@...china.com>
---
kernel/sched/core.c | 3 +--
kernel/sched/sched.h | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 51efaabac3e4..a71d09d6bb75 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5491,11 +5491,10 @@ static void sched_tick_stop(int cpu)
}
#endif /* CONFIG_HOTPLUG_CPU */
-int __init sched_tick_offload_init(void)
+void __init sched_tick_offload_init(void)
{
tick_work_cpu = alloc_percpu(struct tick_work);
BUG_ON(!tick_work_cpu);
- return 0;
}
#else /* !CONFIG_NO_HZ_FULL */
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 8dccb34eb190..850e25f7460d 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2326,7 +2326,7 @@ extern void post_init_entity_util_avg(struct task_struct *p);
#ifdef CONFIG_NO_HZ_FULL
extern bool sched_can_stop_tick(struct rq *rq);
-extern int __init sched_tick_offload_init(void);
+extern void __init sched_tick_offload_init(void);
/*
* Tick may be needed by tasks in the runqueue depending on their policy and
@@ -2346,7 +2346,7 @@ static inline void sched_update_tick_dependency(struct rq *rq)
tick_nohz_dep_set_cpu(cpu, TICK_DEP_BIT_SCHED);
}
#else
-static inline int sched_tick_offload_init(void) { return 0; }
+static inline void sched_tick_offload_init(void) { }
static inline void sched_update_tick_dependency(struct rq *rq) { }
#endif
--
2.18.2
Powered by blists - more mailing lists