From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755197AbcDFPNE (ORCPT ); Wed, 6 Apr 2016 11:13:04 -0400 Received: from smtprelay0087.hostedemail.com ([216.40.44.87]:40333 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753960AbcDFPNA (ORCPT ); Wed, 6 Apr 2016 11:13:00 -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:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2692:2693:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3874:4250:4321:5007:6119:7903:8825:10004:10400:10848:11026:11232:11473:11658:11783:11914:12043:12048:12296:12517:12519:12740:13069:13095:13161:13229:13311:13357:13439:13894:14181:14659:14721:21080:30054:30079:30091,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,LFtime:2,LUA_SUMMARY:none X-HE-Tag: rock88_53d664a2ac24a X-Filterd-Recvd-Size: 2441 Message-ID: <1459955575.6715.46.camel@perches.com> Subject: Re: [PATCH 1/3] intel_pstate: Use pr_fmt From: Joe Perches To: Doug Smythies , "'Srinivas Pandruvada'" , "'Len Brown'" , "'Rafael J. Wysocki'" , "'Viresh Kumar'" Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 06 Apr 2016 08:12:55 -0700 In-Reply-To: <002601d19013$c129de60$437d9b20$@net> References: <710e23a9e0846d1aaa660849321e433b5f5dd4e7.1459887986.git.joe@perches.com> <1459892619.7030.2.camel@linux.intel.com> <002601d19013$c129de60$437d9b20$@net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2016-04-06 at 07:51 -0700, Doug Smythies wrote: > On 2016.04.05 02:44 Srinivas Pandruvada wrote: > > > > On Tue, 2016-04-05 at 13:28 -0700, Joe Perches wrote: > > > > > > Prefix the output using the more common kernel style. > > > > > > Signed-off-by: Joe Perches > > Acked-by: Srinivas Pandruvada > > > > > > --- > > >  drivers/cpufreq/intel_pstate.c | 18 ++++++++++-------- > > >  1 file changed, 10 insertions(+), 8 deletions(-) > ...[cut, example left]... > > > > > - pr_warn("intel_pstate: Turbo disabled by BIOS or > > unavailable on processor\n"); > > + pr_warn("Turbo disabled by BIOS or unavailable on > > processor\n"); > I do  not understand. > The common and unique string "intel_pstate" was added on purpose > so as to provide a way to easily extract the related message from > an otherwise huge log file. > The more common kernel mechanism to prefix messages is using a pr_fmt define like: #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt This style is used ~1000 times in the kernel tree. All of the pr_ macros are defined like: #define pr_info(fmt, ...) \ printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) so this prefixes all messages and means that any new message added later will also be prefixed without copy/paste defects or omission.