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


Groups > linux.kernel > #1257153 > unrolled thread

[PATCH v2] PM / suspend: replacing printk

Started bySaurabh Sengar <saurabh.truth@gmail.com>
First post2015-10-27 20:30 +0100
Last post2015-10-27 20:40 +0100
Articles 4 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2] PM / suspend: replacing printk Saurabh Sengar <saurabh.truth@gmail.com> - 2015-10-27 20:30 +0100
    Re: [PATCH v2] PM / suspend: replacing printk Richard Weinberger <richard.weinberger@gmail.com> - 2015-10-27 20:30 +0100
      Re: [PATCH v2] PM / suspend: replacing printk Richard Weinberger <richard@nod.at> - 2015-10-27 20:40 +0100
    Re: [PATCH v2] PM / suspend: replacing printk Joe Perches <joe@perches.com> - 2015-10-27 20:40 +0100

#1257153 — [PATCH v2] PM / suspend: replacing printk

FromSaurabh Sengar <saurabh.truth@gmail.com>
Date2015-10-27 20:30 +0100
Subject[PATCH v2] PM / suspend: replacing printk
Message-ID<qoi6u-J0-9@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1257157

FromRichard Weinberger <richard.weinberger@gmail.com>
Date2015-10-27 20:30 +0100
Message-ID<qoi6u-J0-33@gated-at.bofh.it>
In reply to#1257153
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1257161

FromRichard Weinberger <richard@nod.at>
Date2015-10-27 20:40 +0100
Message-ID<qoiga-Mb-11@gated-at.bofh.it>
In reply to#1257157
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
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1257162

FromJoe Perches <joe@perches.com>
Date2015-10-27 20:40 +0100
Message-ID<qoiga-Mb-25@gated-at.bofh.it>
In reply to#1257153
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);



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web