kernel: power: replacing printk
Subsystems (2)
PATCH 1/1 kernel: power: replacing printk
replacing prink(s) with appropriate pr_info and pr_err
Signed-off-by Saurabh Sengar <[email protected]>
--- kernel/power/suspend.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
kernel/power/suspend.c +5 -5
@@ -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).\n" , 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\n" ); 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\n" ); goto Platform_early_resume; } error =platform_suspend_prepare_noirq (state);
@@ -486,9 +486,9 @@ static int enter_state(suspend_state_t state)#ifndef CONFIG_SUSPEND_SKIP_SYNC trace_suspend_resume (TPS ("sync_filesystems" ),0 , true); -printk (KERN_INFO "PM: Syncing filesystems ... " ); +pr_info ("PM: Syncing filesystems ... " );sys_sync (); -printk ("done.\n" ); +pr_info ("done.\n" );trace_suspend_resume (TPS ("sync_filesystems" ),0 , false);#endif
Signature · 1 line
1.9.1
Quoted 1 line · Saurabh Sengar
replacing prink(s) with appropriate
pr_infoandpr_err
[]
kernel/power/suspend.c
Quoted 1 line
kernel/power/suspend.c +0
-0
[]
kernel/power/suspend.c static int enter_state(suspend_state_t state) · line 494
Quoted 12 lines
kernel/power/suspend.c +2
-2@@ -486,9 +486,9 @@ static int enter_state(suspend_state_t state)#ifndef CONFIG_SUSPEND_SKIP_SYNC trace_suspend_resume (TPS ("sync_filesystems" ),0 , true); -printk (KERN_INFO "PM: Syncing filesystems ... " ); +pr_info ("PM: Syncing filesystems ... " );sys_sync (); -printk ("done.\n" ); +pr_info ("done.\n" );trace_suspend_resume (TPS ("sync_filesystems" ),0 , false);#endif
This isn't the same output.
The original code emits on a single line.
This new code emits on two lines, the second
line without a "PM: " prefix.