Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752619AbdDCToZ (ORCPT ); Mon, 3 Apr 2017 15:44:25 -0400 Received: from smtprelay0101.hostedemail.com ([216.40.44.101]:44005 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752571AbdDCToY (ORCPT ); Mon, 3 Apr 2017 15:44:24 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:800:960:966:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:4250:4321:4385:4605:5007:6119:7514:7901:7903:8784:10004:10400:10848:11026:11232:11473:11658:11914:12048:12296:12438:12555:12740:12760:12895:13439:14093:14097:14181:14659:14721:21080:21433:21451:30003:30034:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: crack07_601e76af5d562 X-Filterd-Recvd-Size: 3846 Message-ID: <1491248659.27353.64.camel@perches.com> Subject: Re: [PATCH v2 4/6] hpet: replace printk by their pr_xxx counterparts From: Joe Perches To: Corentin Labbe , clemens@ladisch.de, arnd@arndb.de, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org Date: Mon, 03 Apr 2017 12:44:19 -0700 In-Reply-To: <20170403121559.1397-5-clabbe.montjoie@gmail.com> References: <20170403121559.1397-1-clabbe.montjoie@gmail.com> <20170403121559.1397-5-clabbe.montjoie@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 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 Content-Length: 2903 Lines: 82 On Mon, 2017-04-03 at 14:15 +0200, Corentin Labbe wrote: > This patch replace all printk by their pr_xxx counterparts. All? There are others in this file no? printk(KERN_CONT and printk(KERN_WARNING And the conversion of printk(KERN_DEBUG to pr_debug( is not equivalent. printk(KERN_DEBUG is always emitted. pr_debug is only emitted with #define DEBUG or CONFIG_DYNAMIC_DEBUG and a specific enabling of the line. > Signed-off-by: Corentin Labbe > --- > drivers/char/hpet.c | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) > > diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c > index 7a35739..59e89e5 100644 > --- a/drivers/char/hpet.c > +++ b/drivers/char/hpet.c > @@ -491,7 +491,7 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp) > irq_flags = devp->hd_flags & HPET_SHARED_IRQ ? IRQF_SHARED : 0; > if (request_irq(irq, hpet_interrupt, irq_flags, > devp->hd_name, (void *)devp)) { > - printk(KERN_ERR "hpet: IRQ %d is not free\n", irq); > + pr_err("hpet: IRQ %d is not free\n", irq); > irq = 0; > } > } > @@ -841,8 +841,7 @@ int hpet_alloc(struct hpet_data *hdp) > * ACPI has also reported, then we catch it here. > */ > if (hpet_is_known(hdp)) { > - printk(KERN_DEBUG "%s: duplicate HPET ignored\n", > - __func__); > + pr_debug("%s: duplicate HPET ignored\n", __func__); > return 0; > } > > @@ -870,8 +869,7 @@ int hpet_alloc(struct hpet_data *hdp) > ntimer = ((cap & HPET_NUM_TIM_CAP_MASK) >> HPET_NUM_TIM_CAP_SHIFT) + 1; > > if (hpetp->hp_ntimer != ntimer) { > - printk(KERN_WARNING "hpet: number irqs doesn't agree" > - " with number of timers\n"); > + pr_warn("hpet: number irqs doesn't agree with number of timers\n"); > kfree(hpetp); > return -ENODEV; > } > @@ -890,7 +888,7 @@ int hpet_alloc(struct hpet_data *hdp) > do_div(temp, period); > hpetp->hp_tick_freq = temp; /* ticks per second */ > > - printk(KERN_INFO "hpet%d: at MMIO 0x%lx, IRQ%s", > + pr_info("hpet%d: at MMIO 0x%lx, IRQ%s", > hpetp->hp_which, hdp->hd_phys_address, > hpetp->hp_ntimer > 1 ? "s" : ""); > for (i = 0; i < hpetp->hp_ntimer; i++) > @@ -899,8 +897,7 @@ int hpet_alloc(struct hpet_data *hdp) > > temp = hpetp->hp_tick_freq; > remainder = do_div(temp, 1000000); > - printk(KERN_INFO > - "hpet%u: %u comparators, %d-bit %u.%06u MHz counter\n", > + pr_info("hpet%u: %u comparators, %d-bit %u.%06u MHz counter\n", > hpetp->hp_which, hpetp->hp_ntimer, > cap & HPET_COUNTER_SIZE_MASK ? 64 : 32, > (unsigned)temp, remainder); > @@ -1020,7 +1017,7 @@ static int hpet_acpi_add(struct acpi_device *device) > if (!data.hd_address || !data.hd_nirqs) { > if (data.hd_address) > iounmap(data.hd_address); > - printk("%s: no address or irqs in _CRS\n", __func__); > + pr_err("%s: no address or irqs in _CRS\n", __func__); > return -ENODEV; > } >