Merge branch 'sched/warnings' into sched/core, to pick up WARN_ON_ONCE() conversion...
[linux-2.6-block.git] / kernel / sched / deadline.c
index 4cbdc0c560daff2e12b9c20fb5e90f4a400393f0..d116d2b9d2f931bcf8f0cee26f5e0d8d49833433 100644 (file)
@@ -310,7 +310,7 @@ static void dl_change_utilization(struct task_struct *p, u64 new_bw)
 {
        struct rq *rq;
 
-       BUG_ON(p->dl.flags & SCHED_FLAG_SUGOV);
+       WARN_ON_ONCE(p->dl.flags & SCHED_FLAG_SUGOV);
 
        if (task_on_rq_queued(p))
                return;
@@ -607,7 +607,7 @@ static void enqueue_pushable_dl_task(struct rq *rq, struct task_struct *p)
 {
        struct rb_node *leftmost;
 
-       BUG_ON(!RB_EMPTY_NODE(&p->pushable_dl_tasks));
+       WARN_ON_ONCE(!RB_EMPTY_NODE(&p->pushable_dl_tasks));
 
        leftmost = rb_add_cached(&p->pushable_dl_tasks,
                                 &rq->dl.pushable_dl_tasks_root,
@@ -684,7 +684,7 @@ static struct rq *dl_task_offline_migration(struct rq *rq, struct task_struct *p
                         * Failed to find any suitable CPU.
                         * The task will never come back!
                         */
-                       BUG_ON(dl_bandwidth_enabled());
+                       WARN_ON_ONCE(dl_bandwidth_enabled());
 
                        /*
                         * If admission control is disabled we
@@ -830,7 +830,7 @@ static void replenish_dl_entity(struct sched_dl_entity *dl_se)
        struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
        struct rq *rq = rq_of_dl_rq(dl_rq);
 
-       BUG_ON(pi_of(dl_se)->dl_runtime <= 0);
+       WARN_ON_ONCE(pi_of(dl_se)->dl_runtime <= 0);
 
        /*
         * This could be the case for a !-dl task that is boosted.
@@ -1612,7 +1612,7 @@ static void __enqueue_dl_entity(struct sched_dl_entity *dl_se)
 {
        struct dl_rq *dl_rq = dl_rq_of_se(dl_se);
 
-       BUG_ON(!RB_EMPTY_NODE(&dl_se->rb_node));
+       WARN_ON_ONCE(!RB_EMPTY_NODE(&dl_se->rb_node));
 
        rb_add_cached(&dl_se->rb_node, &dl_rq->root, __dl_less);
 
@@ -1636,7 +1636,7 @@ static void __dequeue_dl_entity(struct sched_dl_entity *dl_se)
 static void
 enqueue_dl_entity(struct sched_dl_entity *dl_se, int flags)
 {
-       BUG_ON(on_dl_rq(dl_se));
+       WARN_ON_ONCE(on_dl_rq(dl_se));
 
        update_stats_enqueue_dl(dl_rq_of_se(dl_se), dl_se, flags);
 
@@ -2013,7 +2013,7 @@ static struct task_struct *pick_task_dl(struct rq *rq)
                return NULL;
 
        dl_se = pick_next_dl_entity(dl_rq);
-       BUG_ON(!dl_se);
+       WARN_ON_ONCE(!dl_se);
        p = dl_task_of(dl_se);
 
        return p;
@@ -2273,12 +2273,12 @@ static struct task_struct *pick_next_pushable_dl_task(struct rq *rq)
 
        p = __node_2_pdl(rb_first_cached(&rq->dl.pushable_dl_tasks_root));
 
-       BUG_ON(rq->cpu != task_cpu(p));
-       BUG_ON(task_current(rq, p));
-       BUG_ON(p->nr_cpus_allowed <= 1);
+       WARN_ON_ONCE(rq->cpu != task_cpu(p));
+       WARN_ON_ONCE(task_current(rq, p));
+       WARN_ON_ONCE(p->nr_cpus_allowed <= 1);
 
-       BUG_ON(!task_on_rq_queued(p));
-       BUG_ON(!dl_task(p));
+       WARN_ON_ONCE(!task_on_rq_queued(p));
+       WARN_ON_ONCE(!dl_task(p));
 
        return p;
 }
@@ -2488,7 +2488,7 @@ static void set_cpus_allowed_dl(struct task_struct *p,
        struct root_domain *src_rd;
        struct rq *rq;
 
-       BUG_ON(!dl_task(p));
+       WARN_ON_ONCE(!dl_task(p));
 
        rq = task_rq(p);
        src_rd = rq->rd;