From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755142AbaELSVd (ORCPT ); Mon, 12 May 2014 14:21:33 -0400 Received: from smtprelay0181.hostedemail.com ([216.40.44.181]:39045 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753511AbaELSVc (ORCPT ); Mon, 12 May 2014 14:21:32 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1261:1277:1311:1313:1314:1345:1359:1373:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3872:4250:4321:4605:5007:6119:7652:7903:10004:10400:10848:11026:11232:11658:11914:12296:12438:12517:12519:12555:12740:13019:13069:13095:13161:13229:13311:13357,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: ship92_817cec1ab7b59 X-Filterd-Recvd-Size: 2654 Message-ID: <1399918888.9240.28.camel@joe-AO725> Subject: Re: [PATCH 1/1] kernel/workqueue.c: pr_warning/pr_warn & printk/pr_info From: Joe Perches To: Fabian Frederick , Tejun Heo Cc: linux-kernel , akpm Date: Mon, 12 May 2014 11:21:28 -0700 In-Reply-To: <20140512195623.bedc6e41683596d8d3b486c7@skynet.be> References: <20140512195623.bedc6e41683596d8d3b486c7@skynet.be> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.10.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2014-05-12 at 19:56 +0200, Fabian Frederick wrote: > Cc: Tejun Heo > Cc: Andrew Morton > Signed-off-by: Fabian Frederick > --- > kernel/workqueue.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/kernel/workqueue.c b/kernel/workqueue.c > index 0ee63af..6824afc 100644 > --- a/kernel/workqueue.c > +++ b/kernel/workqueue.c > @@ -4098,8 +4098,8 @@ static void wq_update_unbound_numa(struct workqueue_struct *wq, int cpu, > /* create a new pwq */ > pwq = alloc_unbound_pwq(wq, target_attrs); > if (!pwq) { > - pr_warning("workqueue: allocation failed while updating NUMA affinity of \"%s\"\n", > - wq->name); > + pr_warn("workqueue: allocation failed while updating NUMA affinity of \"%s\"\n", > + wq->name); > goto out_unlock; > } > > @@ -4548,7 +4548,7 @@ void print_worker_info(const char *log_lvl, struct task_struct *task) > probe_kernel_read(desc, worker->desc, sizeof(desc) - 1); > > if (fn || name[0] || desc[0]) { > - printk("%sWorkqueue: %s %pf", log_lvl, name, fn); > + pr_info("%sWorkqueue: %s %pf", log_lvl, name, fn); Not correct. log_lvl already emits the appropriate level and this overrides it with KERN_INFO. The output will now be incorrect emitting at KERN_INFO followed by an SOH and the desired log level. > if (desc[0]) > pr_cont(" (%s)", desc); > pr_cont("\n"); Trivially, it likely would be a bit better to avoid any possible output message interleaving by using: if (fn || name[0] || desc[0]) { if (desc[0]) printk("%sWorkqueue: %s %pf (%s)\n", log_lvl, name, fn, desc); else printk("%sWorkqueue: %s %pf\n", log_lvl, name, fn); }