Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH v2] PM / suspend: replacing printk
@ 2015-10-27 19:21 Saurabh Sengar
  2015-10-27 19:26 ` Richard Weinberger
  2015-10-27 19:37 ` Joe Perches
  0 siblings, 2 replies; 4+ messages in thread
From: Saurabh Sengar @ 2015-10-27 19:21 UTC (permalink / raw)
  To: rjw, pavel, len.brown, linux-pm, linux-kernel; +Cc: Saurabh Sengar

replacing prink(s) with appropriate pr_info and pr_err

Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
---
 kernel/power/suspend.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 7e4cda4..2d8856b 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -245,7 +245,7 @@ static int suspend_test(int level)
 {
 #ifdef CONFIG_PM_DEBUG
 	if (pm_test_level == level) {
-		printk(KERN_INFO "suspend debug: Waiting for %d second(s).\n",
+		pr_info("suspend debug: Waiting for %d second(s).",
 				pm_test_delay);
 		mdelay(pm_test_delay * 1000);
 		return 1;
@@ -317,7 +317,7 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
 
 	error = dpm_suspend_late(PMSG_SUSPEND);
 	if (error) {
-		printk(KERN_ERR "PM: late suspend of devices failed\n");
+		pr_err("PM: late suspend of devices failed");
 		goto Platform_finish;
 	}
 	error = platform_suspend_prepare_late(state);
@@ -326,7 +326,7 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
 
 	error = dpm_suspend_noirq(PMSG_SUSPEND);
 	if (error) {
-		printk(KERN_ERR "PM: noirq suspend of devices failed\n");
+		pr_err("PM: noirq suspend of devices failed");
 		goto Platform_early_resume;
 	}
 	error = platform_suspend_prepare_noirq(state);
-- 
1.9.1


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

* Re: [PATCH v2] PM / suspend: replacing printk
  2015-10-27 19:21 [PATCH v2] PM / suspend: replacing printk Saurabh Sengar
@ 2015-10-27 19:26 ` Richard Weinberger
       [not found]   ` <CAA8avJ9-VNKt=otfhjPtDQq1Tq38=P=Bx=3v7dH58ymKT5Mr6w@mail.gmail.com>
  2015-10-27 19:37 ` Joe Perches
  1 sibling, 1 reply; 4+ messages in thread
From: Richard Weinberger @ 2015-10-27 19:26 UTC (permalink / raw)
  To: Saurabh Sengar; +Cc: Rafael J. Wysocki, Pavel Machek, Len Brown, linux-pm, LKML

On Tue, Oct 27, 2015 at 8:21 PM, Saurabh Sengar <saurabh.truth@gmail.com> wrote:
> replacing prink(s) with appropriate pr_info and pr_err
>
> Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
> ---
>  kernel/power/suspend.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

In which way does this patch improve the existing code?
You describe what it does but not which problem it solves and
why this patch is necessary.

-- 
Thanks,
//richard

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

* Re: [PATCH v2] PM / suspend: replacing printk
       [not found]   ` <CAA8avJ9-VNKt=otfhjPtDQq1Tq38=P=Bx=3v7dH58ymKT5Mr6w@mail.gmail.com>
@ 2015-10-27 19:36     ` Richard Weinberger
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Weinberger @ 2015-10-27 19:36 UTC (permalink / raw)
  To: Saurabh Sengar
  Cc: linux-kernel, linux-pm, Len Brown, Pavel Machek,
	Rafael J. Wysocki

Am 27.10.2015 um 20:32 schrieb Saurabh Sengar:
> it fixes the checkpatch.pl <http://checkpatch.pl> warnings

Don't get me wrong, but checkpatch.pl is only a script which makes suggestions.
Especially as these are only warnings and not errors.

IMHO the code is perfectly fine as is.

Thanks,
//richard

> On Oct 28, 2015 12:56 AM, "Richard Weinberger" <richard.weinberger@gmail.com <mailto:richard.weinberger@gmail.com>> wrote:
>>
>> On Tue, Oct 27, 2015 at 8:21 PM, Saurabh Sengar <saurabh.truth@gmail.com <mailto:saurabh.truth@gmail.com>> wrote:
>> > replacing prink(s) with appropriate pr_info and pr_err
>> >
>> > Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com <mailto:saurabh.truth@gmail.com>>
>> > ---
>> >  kernel/power/suspend.c | 6 +++---
>> >  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> In which way does this patch improve the existing code?
>> You describe what it does but not which problem it solves and
>> why this patch is necessary.
>>
>> --
>> Thanks,
>> //richard
> 

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

* Re: [PATCH v2] PM / suspend: replacing printk
  2015-10-27 19:21 [PATCH v2] PM / suspend: replacing printk Saurabh Sengar
  2015-10-27 19:26 ` Richard Weinberger
@ 2015-10-27 19:37 ` Joe Perches
  1 sibling, 0 replies; 4+ messages in thread
From: Joe Perches @ 2015-10-27 19:37 UTC (permalink / raw)
  To: Saurabh Sengar; +Cc: rjw, pavel, len.brown, linux-pm, linux-kernel

On Wed, 2015-10-28 at 00:51 +0530, Saurabh Sengar wrote:
> replacing prink(s) with appropriate pr_info and pr_err

Removing the terminating newlines is likely incorrect.

> diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
[]
> @@ -245,7 +245,7 @@ static int suspend_test(int level)
>  {
>  #ifdef CONFIG_PM_DEBUG
>  	if (pm_test_level == level) {
> -		printk(KERN_INFO "suspend debug: Waiting for %d second(s).\n",
> +		pr_info("suspend debug: Waiting for %d second(s).",
>  				pm_test_delay);
>  		mdelay(pm_test_delay * 1000);
>  		return 1;
> @@ -317,7 +317,7 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
>  
>  	error = dpm_suspend_late(PMSG_SUSPEND);
>  	if (error) {
> -		printk(KERN_ERR "PM: late suspend of devices failed\n");
> +		pr_err("PM: late suspend of devices failed");
>  		goto Platform_finish;
>  	}
>  	error = platform_suspend_prepare_late(state);
> @@ -326,7 +326,7 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
>  
>  	error = dpm_suspend_noirq(PMSG_SUSPEND);
>  	if (error) {
> -		printk(KERN_ERR "PM: noirq suspend of devices failed\n");
> +		pr_err("PM: noirq suspend of devices failed");
>  		goto Platform_early_resume;
>  	}
>  	error = platform_suspend_prepare_noirq(state);




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

end of thread, other threads:[~2015-10-27 19:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-27 19:21 [PATCH v2] PM / suspend: replacing printk Saurabh Sengar
2015-10-27 19:26 ` Richard Weinberger
     [not found]   ` <CAA8avJ9-VNKt=otfhjPtDQq1Tq38=P=Bx=3v7dH58ymKT5Mr6w@mail.gmail.com>
2015-10-27 19:36     ` Richard Weinberger
2015-10-27 19:37 ` Joe Perches

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