[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c6ef4c847aecbe12cc2bd71509c0359aade18fcc.camel@perches.com>
Date: Thu, 26 May 2022 02:42:35 -0700
From: Joe Perches <joe@...ches.com>
To: Yu Zhe <yuzhe@...china.com>, 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, vschneid@...hat.com
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
liqiong@...china.com
Subject: Re: [PATCH] sched: change printk(KERN_<LEVEL>.. to pr_<level>()
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.
Powered by blists - more mailing lists