* [PATCH] kernel/sched/cpudeadline: Fixed code style errors and warnings
@ 2018-02-08 2:53 Mario Leinweber
2018-02-13 12:27 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Mario Leinweber @ 2018-02-08 2:53 UTC (permalink / raw)
To: mingo; +Cc: peterz, linux-kernel, Mario Leinweber
diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c
index 8d9562d890d3..6a9defebbb54 100644
--- a/kernel/sched/cpudeadline.c
+++ b/kernel/sched/cpudeadline.c
@@ -42,8 +42,9 @@ static void cpudl_heapify_down(struct cpudl *cp, int idx)
return;
/* adapted from lib/prio_heap.c */
- while(1) {
+ while (1) {
u64 largest_dl;
+
l = left_child(idx);
r = right_child(idx);
largest = idx;
@@ -131,6 +132,7 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,
return 1;
} else {
int best_cpu = cpudl_maximum(cp);
+
WARN_ON(best_cpu != -1 && !cpu_present(best_cpu));
if (cpumask_test_cpu(best_cpu, &p->cpus_allowed) &&
@@ -205,6 +207,7 @@ void cpudl_set(struct cpudl *cp, int cpu, u64 dl)
old_idx = cp->elements[cpu].idx;
if (old_idx == IDX_INVALID) {
int new_idx = cp->size++;
+
cp->elements[new_idx].dl = dl;
cp->elements[new_idx].cpu = cpu;
cp->elements[cpu].idx = new_idx;
--
2.14.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kernel/sched/cpudeadline: Fixed code style errors and warnings
2018-02-08 2:53 [PATCH] kernel/sched/cpudeadline: Fixed code style errors and warnings Mario Leinweber
@ 2018-02-13 12:27 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2018-02-13 12:27 UTC (permalink / raw)
To: Mario Leinweber; +Cc: mingo, peterz, linux-kernel
* Mario Leinweber <marioleinweber@web.de> wrote:
> diff --git a/kernel/sched/cpudeadline.c b/kernel/sched/cpudeadline.c
> index 8d9562d890d3..6a9defebbb54 100644
> --- a/kernel/sched/cpudeadline.c
> +++ b/kernel/sched/cpudeadline.c
> @@ -42,8 +42,9 @@ static void cpudl_heapify_down(struct cpudl *cp, int idx)
> return;
>
> /* adapted from lib/prio_heap.c */
> - while(1) {
> + while (1) {
> u64 largest_dl;
> +
> l = left_child(idx);
> r = right_child(idx);
> largest = idx;
> @@ -131,6 +132,7 @@ int cpudl_find(struct cpudl *cp, struct task_struct *p,
> return 1;
> } else {
> int best_cpu = cpudl_maximum(cp);
> +
> WARN_ON(best_cpu != -1 && !cpu_present(best_cpu));
>
> if (cpumask_test_cpu(best_cpu, &p->cpus_allowed) &&
> @@ -205,6 +207,7 @@ void cpudl_set(struct cpudl *cp, int cpu, u64 dl)
> old_idx = cp->elements[cpu].idx;
> if (old_idx == IDX_INVALID) {
> int new_idx = cp->size++;
> +
> cp->elements[new_idx].dl = dl;
> cp->elements[new_idx].cpu = cpu;
> cp->elements[cpu].idx = new_idx;
Your Signed-off-by tag is missing.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-13 12:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-08 2:53 [PATCH] kernel/sched/cpudeadline: Fixed code style errors and warnings Mario Leinweber
2018-02-13 12:27 ` Ingo Molnar
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.