Linux ACPI
 help / color / mirror / Atom feed
* [PATCH] ACPI / AC: used pr_info instead of printk
@ 2020-12-11  6:50 Tian Tao
  2020-12-11 20:01 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Tian Tao @ 2020-12-11  6:50 UTC (permalink / raw)
  To: rjw, lenb; +Cc: linux-acpi

printk(KERNEL_INFO) is same with pr_info, so used pr_info instead of
printk.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/acpi/ac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 46a64e9..5e4b9c1 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -278,9 +278,9 @@ static int acpi_ac_add(struct acpi_device *device)
 		goto end;
 	}
 
-	printk(KERN_INFO PREFIX "%s [%s] (%s)\n",
-	       acpi_device_name(device), acpi_device_bid(device),
-	       ac->state ? "on-line" : "off-line");
+	pr_info(PREFIX "%s [%s] (%s)\n",
+		acpi_device_name(device), acpi_device_bid(device),
+		ac->state ? "on-line" : "off-line");
 
 	ac->battery_nb.notifier_call = acpi_ac_battery_notify;
 	register_acpi_notifier(&ac->battery_nb);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI / AC: used pr_info instead of printk
  2020-12-11  6:50 [PATCH] ACPI / AC: used pr_info instead of printk Tian Tao
@ 2020-12-11 20:01 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2020-12-11 20:01 UTC (permalink / raw)
  To: Tian Tao; +Cc: lenb, linux-acpi

On Friday, December 11, 2020 7:50:12 AM CET Tian Tao wrote:
> printk(KERNEL_INFO) is same with pr_info, so used pr_info instead of
> printk.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
>  drivers/acpi/ac.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
> index 46a64e9..5e4b9c1 100644
> --- a/drivers/acpi/ac.c
> +++ b/drivers/acpi/ac.c
> @@ -278,9 +278,9 @@ static int acpi_ac_add(struct acpi_device *device)
>  		goto end;
>  	}
>  
> -	printk(KERN_INFO PREFIX "%s [%s] (%s)\n",
> -	       acpi_device_name(device), acpi_device_bid(device),
> -	       ac->state ? "on-line" : "off-line");
> +	pr_info(PREFIX "%s [%s] (%s)\n",
> +		acpi_device_name(device), acpi_device_bid(device),
> +		ac->state ? "on-line" : "off-line");

What about defining a proper pr_fmt() for this file instead of using PREFIX
here?

>  
>  	ac->battery_nb.notifier_call = acpi_ac_battery_notify;
>  	register_acpi_notifier(&ac->battery_nb);
> 





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-11 21:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-11  6:50 [PATCH] ACPI / AC: used pr_info instead of printk Tian Tao
2020-12-11 20:01 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox