linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: cpuidle: This patch fix the following checkpatch warning.
@ 2019-04-17  7:06 Mohan Kumar
  0 siblings, 0 replies; 3+ messages in thread
From: Mohan Kumar @ 2019-04-17  7:06 UTC (permalink / raw)
  To: rjw; +Cc: linux-pm, daniel.lezcano, linux-kernel, linuxppc-dev

Use pr_debug instead of printk

WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ...
then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

Signed-off-by: Mohan Kumar <mohankumar718@gmail.com>
---
 drivers/cpuidle/cpuidle-pseries.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cpuidle/cpuidle-pseries.c b/drivers/cpuidle/cpuidle-pseries.c
index 74c2479..a9c1db8 100644
--- a/drivers/cpuidle/cpuidle-pseries.c
+++ b/drivers/cpuidle/cpuidle-pseries.c
@@ -282,7 +282,7 @@ static int __init pseries_processor_idle_init(void)
 	pseries_cpuidle_driver_init();
 	retval = cpuidle_register(&pseries_idle_driver, NULL);
 	if (retval) {
-		printk(KERN_DEBUG "Registration of pseries driver failed.\n");
+		pr_debug("Registration of pseries driver failed.\n");
 		return retval;
 	}
 
@@ -294,7 +294,7 @@ static int __init pseries_processor_idle_init(void)
 					   "cpuidle/pseries:DEAD", NULL,
 					   pseries_cpuidle_cpu_dead);
 	WARN_ON(retval < 0);
-	printk(KERN_DEBUG "pseries_idle_driver registered\n");
+	pr_debug("pseries_idle_driver registered\n");
 	return 0;
 }
 
-- 
2.7.4


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

* Re: [PATCH] drivers: cpuidle: This patch fix the following checkpatch warning.
  2019-04-17 14:52 Mohan Kumar
@ 2019-04-18 13:57 ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2019-04-18 13:57 UTC (permalink / raw)
  To: Mohan Kumar; +Cc: daniel.lezcano, linuxppc-dev, linux-kernel, linux-pm

On Wednesday, April 17, 2019 4:52:34 PM CEST Mohan Kumar wrote:
> Use pr_debug instead of printk
> 
> WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then
> dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...
> 
> Signed-off-by: Mohan Kumar <mohankumar718@gmail.com>
> ---
>  drivers/cpuidle/cpuidle-powernv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
> index 84b1ebe..7cf9835 100644
> --- a/drivers/cpuidle/cpuidle-powernv.c
> +++ b/drivers/cpuidle/cpuidle-powernv.c
> @@ -401,7 +401,7 @@ static int __init powernv_processor_idle_init(void)
>  	powernv_cpuidle_driver_init();
>  	retval = cpuidle_register(&powernv_idle_driver, NULL);
>  	if (retval) {
> -		printk(KERN_DEBUG "Registration of powernv driver failed.\n");
> +		pr_debug("Registration of powernv driver failed.\n");
>  		return retval;
>  	}
>  
> @@ -413,7 +413,7 @@ static int __init powernv_processor_idle_init(void)
>  					   "cpuidle/powernv:dead", NULL,
>  					   powernv_cpuidle_cpu_dead);
>  	WARN_ON(retval < 0);
> -	printk(KERN_DEBUG "powernv_idle_driver registered\n");
> +	pr_debug("powernv_idle_driver registered\n");
>  	return 0;
>  }
>  
> 

Recently, you've sent two different patches against two different drivers with the same subject.

IMO it is fair enough to call that "confusing".

Moreover, pr_debug() is not a direct replacement for printk(KERN_DEBUG ) as the latter does
not require dynamic debug to be enabled and I'm not really sure if you are aware of that
difference.





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

* [PATCH] drivers: cpuidle: This patch fix the following checkpatch warning.
@ 2019-04-17 14:52 Mohan Kumar
  2019-04-18 13:57 ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Mohan Kumar @ 2019-04-17 14:52 UTC (permalink / raw)
  To: rjw; +Cc: daniel.lezcano, linuxppc-dev, linux-kernel, linux-pm

Use pr_debug instead of printk

WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then
dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG ...

Signed-off-by: Mohan Kumar <mohankumar718@gmail.com>
---
 drivers/cpuidle/cpuidle-powernv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
index 84b1ebe..7cf9835 100644
--- a/drivers/cpuidle/cpuidle-powernv.c
+++ b/drivers/cpuidle/cpuidle-powernv.c
@@ -401,7 +401,7 @@ static int __init powernv_processor_idle_init(void)
 	powernv_cpuidle_driver_init();
 	retval = cpuidle_register(&powernv_idle_driver, NULL);
 	if (retval) {
-		printk(KERN_DEBUG "Registration of powernv driver failed.\n");
+		pr_debug("Registration of powernv driver failed.\n");
 		return retval;
 	}
 
@@ -413,7 +413,7 @@ static int __init powernv_processor_idle_init(void)
 					   "cpuidle/powernv:dead", NULL,
 					   powernv_cpuidle_cpu_dead);
 	WARN_ON(retval < 0);
-	printk(KERN_DEBUG "powernv_idle_driver registered\n");
+	pr_debug("powernv_idle_driver registered\n");
 	return 0;
 }
 
-- 
2.7.4


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

end of thread, other threads:[~2019-04-18 14:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17  7:06 [PATCH] drivers: cpuidle: This patch fix the following checkpatch warning Mohan Kumar
2019-04-17 14:52 Mohan Kumar
2019-04-18 13:57 ` 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;
as well as URLs for NNTP newsgroup(s).