* [PATCH -next] sched: make sched_set_stop_task() static
@ 2021-05-29 2:29 Bixuan Cui
2021-05-29 2:36 ` Bixuan Cui
2021-05-31 7:33 ` Peter Zijlstra
0 siblings, 2 replies; 3+ messages in thread
From: Bixuan Cui @ 2021-05-29 2:29 UTC (permalink / raw)
To: mingo, peterz, juri.lelli, vincent.guittot
Cc: dietmar.eggemann, rostedt, bsegall, mgorman, bristot,
linux-kernel, Bixuan Cui
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="y", Size: 792 bytes --]
make W=1 generates the following warning for kernel/sched/core.c:
warning: no previous prototype for ‘sched_set_stop_task’ [-Wmissing-prototypes]
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index adea0b1e8036..1c1e9612018b 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3209,7 +3209,7 @@ int select_task_rq(struct task_struct *p, int cpu, int wake_flags)
return cpu;
}
-void sched_set_stop_task(int cpu, struct task_struct *stop)
+static void sched_set_stop_task(int cpu, struct task_struct *stop)
{
static struct lock_class_key stop_pi_lock;
struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] sched: make sched_set_stop_task() static
2021-05-29 2:29 [PATCH -next] sched: make sched_set_stop_task() static Bixuan Cui
@ 2021-05-29 2:36 ` Bixuan Cui
2021-05-31 7:33 ` Peter Zijlstra
1 sibling, 0 replies; 3+ messages in thread
From: Bixuan Cui @ 2021-05-29 2:36 UTC (permalink / raw)
To: mingo, peterz, juri.lelli, vincent.guittot
Cc: dietmar.eggemann, rostedt, bsegall, mgorman, bristot, linux-kernel
On 2021/5/29 10:29, Bixuan Cui wrote:
> make W=1 generates the following warning for kernel/sched/core.c:
> warning: no previous prototype for ‘sched_set_stop_task’ [-Wmissing-prototypes]
>
> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
> ---
> kernel/sched/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index adea0b1e8036..1c1e9612018b 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -3209,7 +3209,7 @@ int select_task_rq(struct task_struct *p, int cpu, int wake_flags)
> return cpu;
> }
>
> -void sched_set_stop_task(int cpu, struct task_struct *stop)
> +static void sched_set_stop_task(int cpu, struct task_struct *stop)
> {
> static struct lock_class_key stop_pi_lock;
> struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
Hi, This patch will cause compilation errors. Please ignore it. :-(
Thanks
Bixuan Cui
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] sched: make sched_set_stop_task() static
2021-05-29 2:29 [PATCH -next] sched: make sched_set_stop_task() static Bixuan Cui
2021-05-29 2:36 ` Bixuan Cui
@ 2021-05-31 7:33 ` Peter Zijlstra
1 sibling, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2021-05-31 7:33 UTC (permalink / raw)
To: Bixuan Cui
Cc: mingo, juri.lelli, vincent.guittot, dietmar.eggemann, rostedt,
bsegall, mgorman, bristot, linux-kernel
On Sat, May 29, 2021 at 10:29:56AM +0800, Bixuan Cui wrote:
> make W=1 generates the following warning for kernel/sched/core.c:
> warning: no previous prototype for ‘sched_set_stop_task’ [-Wmissing-prototypes]
>
> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
> ---
> kernel/sched/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index adea0b1e8036..1c1e9612018b 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -3209,7 +3209,7 @@ int select_task_rq(struct task_struct *p, int cpu, int wake_flags)
> return cpu;
> }
>
> -void sched_set_stop_task(int cpu, struct task_struct *stop)
> +static void sched_set_stop_task(int cpu, struct task_struct *stop)
> {
> static struct lock_class_key stop_pi_lock;
> struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
Clearly you tested this well...
$ git grep sched_set_stop_task
kernel/sched/core.c:void sched_set_stop_task(int cpu, struct task_struct *stop)
kernel/stop_machine.c:extern void sched_set_stop_task(int cpu, struct task_struct *stop);
kernel/stop_machine.c: sched_set_stop_task(cpu, per_cpu(cpu_stopper.thread, cpu));
Please be more careful.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-31 7:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-29 2:29 [PATCH -next] sched: make sched_set_stop_task() static Bixuan Cui
2021-05-29 2:36 ` Bixuan Cui
2021-05-31 7:33 ` Peter Zijlstra
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.