Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2402025ioo; Sat, 28 May 2022 12:28:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDJXAvTxeEbnlblL5gWxM5G6LEpVHcjxc0CUKen0k/sXU0JjjDg/1BHgZN0OKzvDOONWlh X-Received: by 2002:a17:902:f690:b0:163:c6a3:f7b8 with SMTP id l16-20020a170902f69000b00163c6a3f7b8mr1088417plg.63.1653766138611; Sat, 28 May 2022 12:28:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653766138; cv=none; d=google.com; s=arc-20160816; b=DMzCF0azqrDbAtcQjycWsO7eu8JsVCInwqgXJ6+yTRx3eWW3A9HnS+/XtrNFgBzBF7 DLzwyZS+lNYgLrxr2MKoUsuuW9mqJoDWdbV12hYUO+e7haVI+Bs88oOzFxVtQ4nscQJ7 ns0qnPlhq83EoG8IuXNfsi++4ChN9z7oU8YElLYAKbyKWohBHmDPgsJK3JoBgKwLpspo X+0dwA0rtL7CwfFLe6U/ZqDm0gWL5+MRIZsqW8atspQzZHfGU92vJ5fHowo4oq76UnP4 5VuLjs/MI2vfHVOOxg2QZNYms2amBtgFybUe08Mw40A75FbNodav15xVPAlDvU5RT26Q r8Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=q7lnZJT3rFdilupMM+ZV9wu2TZqikPNEoLhvnxIyA2s=; b=xo0+SmP5R4qisKpBJeFPQ7E97UTeRNijQVz8jUSTx+zcrlpti51NaxtH53dWO674TA x0ZQwNSdGP2tXbCPSXZDvnYtSN0EqN+wONJhH+ngc8YL8ToXnaJZv51zA2YRcSYOAinR dfsXjIuBIOdIpd/y9Km8Vr2alVqy+TA3f/2rfwZKDnVPRoliDkkpRsHa/NefhwhzKOff 2BxsSXaedeSKHMSG0wziSVs3HNpK8eJhsJLL3qJKvIu0gjkhDD6PB5m1ewGlIBjUriyt ZcCuJRF2GUj6KhteTzeeW9++1BbqQ2VTqHVUYv0JCFSX7GSx3llyq+hRrYGaz4IAve4n oY8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o3-20020a635d43000000b003faf7a29e9esi3229063pgm.528.2022.05.28.12.28.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 12:28:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C9C581C133; Sat, 28 May 2022 11:57:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346874AbiEZJmm (ORCPT + 99 others); Thu, 26 May 2022 05:42:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234213AbiEZJml (ORCPT ); Thu, 26 May 2022 05:42:41 -0400 Received: from relay3.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 792AFC8BDD for ; Thu, 26 May 2022 02:42:40 -0700 (PDT) Received: from omf07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id B976720544; Thu, 26 May 2022 09:42:38 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf07.hostedemail.com (Postfix) with ESMTPA id 021252003D; Thu, 26 May 2022 09:42:35 +0000 (UTC) Message-ID: Subject: Re: [PATCH] sched: change printk(KERN_.. to pr_() From: Joe Perches To: Yu Zhe , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, liqiong@nfschina.com Date: Thu, 26 May 2022 02:42:35 -0700 In-Reply-To: <20220526091031.3741819-1-yuzhe@nfschina.com> References: <20220526091031.3741819-1-yuzhe@nfschina.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.40.4-1ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Stat-Signature: 4uf7udqbm87wddzbw3h8mwznh4j9xm41 X-Rspamd-Server: rspamout02 X-Rspamd-Queue-Id: 021252003D X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19/TJyW95qAsdXhHiBoregiLp5IybD9cZ8= X-HE-Tag: 1653558155-406124 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2022-05-26 at 02:10 -0700, Yu Zhe wrote: > Prefer pr_(... to printk(KERN_ ..., 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.