Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1615153

[PATCH v2 4/6] hpet: replace printk by their pr_xxx counterparts

From Corentin Labbe <clabbe.montjoie@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2 4/6] hpet: replace printk by their pr_xxx counterparts
Date 2017-04-03 14:20 +0200
Message-ID <ts97J-6L2-31@gated-at.bofh.it> (permalink)
References <ts97I-6L2-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch replace all printk by their pr_xxx counterparts.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
 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;
 	}
 
-- 
2.10.2

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/6] hpet: fix build warnings and style Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-04-03 14:20 +0200
  [PATCH v2 1/6] hpet: remove unused variable hpet in hpet_ioctl_common Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-04-03 14:20 +0200
  [PATCH v2 5/6] hpet: removing unused variable m in hpet_interrupt Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-04-03 14:20 +0200
    Re: [PATCH v2 5/6] hpet: removing unused variable m in hpet_interrupt Clemens Ladisch <clemens@ladisch.de> - 2017-04-03 15:10 +0200
      Re: [PATCH 1/2] Alps HID I2C T4 device support Nikolaus Rath <Nikolaus@rath.org> - 2017-04-04 05:10 +0200
        RE: [PATCH 1/2] Alps HID I2C T4 device support Masaki Ota <masaki.ota@jp.alps.com> - 2017-04-04 09:00 +0200
          RE: [PATCH 1/2] Alps HID I2C T4 device support Masaki Ota <masaki.ota@jp.alps.com> - 2017-04-05 01:50 +0200
            Re: [PATCH 1/2] Alps HID I2C T4 device support Nikolaus Rath <Nikolaus@rath.org> - 2017-04-05 01:50 +0200
              RE: [PATCH 1/2] Alps HID I2C T4 device support Masaki Ota <masaki.ota@jp.alps.com> - 2017-04-05 01:50 +0200
                Re: [PATCH 1/2] Alps HID I2C T4 device support Nikolaus Rath <Nikolaus@rath.org> - 2017-04-05 02:10 +0200
                RE: [PATCH 1/2] Alps HID I2C T4 device support Masaki Ota <masaki.ota@jp.alps.com> - 2017-04-05 10:50 +0200
                Re: [PATCH 1/2] Alps HID I2C T4 device support Nikolaus Rath <Nikolaus@rath.org> - 2017-04-05 20:40 +0200
                RE: [PATCH 1/2] Alps HID I2C T4 device support Masaki Ota <masaki.ota@jp.alps.com> - 2017-04-06 03:10 +0200
                Re: [PATCH 1/2] Alps HID I2C T4 device support Nikolaus Rath <Nikolaus@rath.org> - 2017-04-07 01:10 +0200
  [PATCH v2 2/6] hpet: remove unused writeq/readq function definitions Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-04-03 14:20 +0200
  [PATCH v2 6/6] hpet: fix style issue about braces and alignment Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-04-03 14:20 +0200
    Re: [PATCH v2 6/6] hpet: fix style issue about braces and alignment Joe Perches <joe@perches.com> - 2017-04-04 05:50 +0200
  [PATCH v2 4/6] hpet: replace printk by their pr_xxx counterparts Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-04-03 14:20 +0200
    Re: [PATCH v2 4/6] hpet: replace printk by their pr_xxx counterparts Joe Perches <joe@perches.com> - 2017-04-03 21:50 +0200
  [PATCH v2 3/6] hpet: fix checkpatch complains about spaces Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-04-03 14:20 +0200

csiph-web