lkml.org 
[lkml]   [2022]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] sched: change printk(KERN_<LEVEL>.. to pr_<level>()
From
Date
On Thu, 2022-05-26 at 02:10 -0700, Yu Zhe wrote:
> Prefer pr_<level>(... to printk(KERN_<LEVEL> ..., change them.

Do remember that checkpatch is just a guide and isn't always correct.

You are responsible for verifying that anything it suggests is
converted properly.

> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
[]
> @@ -9370,7 +9370,7 @@ static void dump_rq_tasks(struct rq *rq, const char *loglvl)
>
> lockdep_assert_rq_held(rq);
>
> - printk("%sCPU%d enqueued tasks (%u total):\n", loglvl, cpu, rq->nr_running);
> + pr_warn("%sCPU%d enqueued tasks (%u total):\n", loglvl, cpu, rq->nr_running);

This is _not_ a good change.

Do please look to see what loglvl is and if this change is appropriate.

> for_each_process_thread(g, p) {
> if (task_cpu(p) != cpu)
> continue;
> @@ -9378,7 +9378,7 @@ static void dump_rq_tasks(struct rq *rq, const char *loglvl)
> if (!task_on_rq_queued(p))
> continue;
>
> - printk("%s\tpid: %d, name: %s\n", loglvl, p->pid, p->comm);
> + pr_warn("%s\tpid: %d, name: %s\n", loglvl, p->pid, p->comm);

here too.


\
 
 \ /
  Last update: 2022-05-26 11:42    [W:0.048 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site