PM / suspend: replacing printk
Subsystems (2)
PATCH v2 1/1 PM / suspend: replacing printk
replacing prink(s) with appropriate pr_info and pr_err
--- kernel/power/suspend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
kernel/power/suspend.c +3 -3
@@ -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);
Signature · 1 line
1.9.1
Quoted 6 lines · Saurabh Sengar
replacing prink(s) with appropriate
pr_infoandpr_errSigned-off-by Saurabh Sengar <[email protected]>--- 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.
Signature · 2 lines
Thanks, //richard
Am 27.10.2015 um 20:32 schrieb Saurabh Sengar:
Quoted 1 line
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
Quoted 18 lines · On Oct 28, 2015 12:56 AM, "Richard Weinberger" <[email protected]…
Quoted 16 lines · On Tue, Oct 27, 2015 at 8:21 PM, Saurabh Sengar <[email protected]…
Quoted 6 lines
replacing prink(s) with appropriate
pr_infoandpr_errSigned-off-by Saurabh Sengar <[email protected] <mailto:[email protected]>>--- 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
Quoted 1 line · Saurabh Sengar
replacing prink(s) with appropriate
pr_infoandpr_err
Removing the terminating newlines is likely incorrect.
kernel/power/suspend.c
Quoted 1 line
kernel/power/suspend.c +0
-0
[]
Quoted 27 lines
kernel/power/suspend.c +3
-3@@ -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);