Re: [PATCH] sched: change printk(KERN_<LEVEL>.. to pr_<level>()

From: Dan Carpenter
Date: Fri May 27 2022 - 02:11:10 EST


On Thu, May 26, 2022 at 02:10:31AM -0700, Yu Zhe wrote:
> @@ -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);
^^^^^^

Your patch is wrong. The code aready has loglvl but as a variable.

Don't start sending checkpatch stuff to kernel/sched. Better to get
some experience in drivers/staging/ because Greg deliberately leaves a
lot of garbage code for people to clean up and get experience.

regards,
dan carpenter