public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Corentin Labbe <clabbe.montjoie@gmail.com>,
	clemens@ladisch.de, arnd@arndb.de, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/6] hpet: replace printk by their pr_xxx counterparts
Date: Mon, 03 Apr 2017 12:44:19 -0700	[thread overview]
Message-ID: <1491248659.27353.64.camel@perches.com> (raw)
In-Reply-To: <20170403121559.1397-5-clabbe.montjoie@gmail.com>

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 <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;
>  	}
>  

  reply	other threads:[~2017-04-03 19:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 12:15 [PATCH v2 0/6] hpet: fix build warnings and style Corentin Labbe
2017-04-03 12:15 ` [PATCH v2 1/6] hpet: remove unused variable hpet in hpet_ioctl_common Corentin Labbe
2017-04-03 12:15 ` [PATCH v2 2/6] hpet: remove unused writeq/readq function definitions Corentin Labbe
2017-04-03 12:15 ` [PATCH v2 3/6] hpet: fix checkpatch complains about spaces Corentin Labbe
2017-04-03 12:15 ` [PATCH v2 4/6] hpet: replace printk by their pr_xxx counterparts Corentin Labbe
2017-04-03 19:44   ` Joe Perches [this message]
2017-04-03 12:15 ` [PATCH v2 5/6] hpet: removing unused variable m in hpet_interrupt Corentin Labbe
2017-04-03 12:55   ` Clemens Ladisch
2017-04-04  3:08     ` [PATCH 1/2] Alps HID I2C T4 device support Nikolaus Rath
2017-04-04  6:55       ` Masaki Ota
2017-04-04 17:08         ` Nikolaus Rath
2017-04-04 23:40           ` Masaki Ota
2017-04-04 23:42             ` Nikolaus Rath
2017-04-04 23:49               ` Masaki Ota
2017-04-05  0:01                 ` Nikolaus Rath
2017-04-05  8:43                   ` Masaki Ota
2017-04-05 18:35                     ` Nikolaus Rath
2017-04-06  1:07                       ` Masaki Ota
2017-04-06 22:59                         ` Nikolaus Rath
2017-04-03 12:15 ` [PATCH v2 6/6] hpet: fix style issue about braces and alignment Corentin Labbe
2017-04-04  3:43   ` Joe Perches
  -- strict thread matches above, loose matches on Subject: below --
2017-03-30  2:53 [PATCH 0/2] Support new Alps HID I2C Touchpad device Masaki Ota
2017-03-30  2:53 ` [PATCH 1/2] Alps HID I2C T4 device support Masaki Ota
2017-04-24 14:54   ` Benjamin Tissoires
2017-03-30  2:53 ` [PATCH 2/2] Add new U1 device ID Masaki Ota

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1491248659.27353.64.camel@perches.com \
    --to=joe@perches.com \
    --cc=arnd@arndb.de \
    --cc=clabbe.montjoie@gmail.com \
    --cc=clemens@ladisch.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox