Skip to content

Commit 75d19e3

Browse files
iamclintgeorgegregkh
authored andcommitted
hangcheck-timer: replace printk(KERN_CRIT) with pr_crit
Replace printk(KERN_CRIT ...) with pr_crit(...) and printk() with pr_debug(). The change aims to make logging more consistent and readable. Signed-off-by: Clint George <clintbgeorge@gmail.com> Link: https://patch.msgid.link/20251111151340.9162-2-clintbgeorge@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3397c3c commit 75d19e3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/char/hangcheck-timer.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,23 +126,23 @@ static void hangcheck_fire(struct timer_list *unused)
126126

127127
if (tsc_diff > hangcheck_tsc_margin) {
128128
if (hangcheck_dump_tasks) {
129-
printk(KERN_CRIT "Hangcheck: Task state:\n");
129+
pr_crit("Hangcheck: Task state:\n");
130130
#ifdef CONFIG_MAGIC_SYSRQ
131131
handle_sysrq('t');
132132
#endif /* CONFIG_MAGIC_SYSRQ */
133133
}
134134
if (hangcheck_reboot) {
135-
printk(KERN_CRIT "Hangcheck: hangcheck is restarting the machine.\n");
135+
pr_crit("Hangcheck: hangcheck is restarting the machine.\n");
136136
emergency_restart();
137137
} else {
138-
printk(KERN_CRIT "Hangcheck: hangcheck value past margin!\n");
138+
pr_crit("Hangcheck: hangcheck value past margin!\n");
139139
}
140140
}
141141
#if 0
142142
/*
143143
* Enable to investigate delays in detail
144144
*/
145-
printk("Hangcheck: called %Ld ns since last time (%Ld ns overshoot)\n",
145+
pr_debug("Hangcheck: called %Ld ns since last time (%Ld ns overshoot)\n",
146146
tsc_diff, tsc_diff - hangcheck_tick*TIMER_FREQ);
147147
#endif
148148
mod_timer(&hangcheck_ticktock, jiffies + (hangcheck_tick*HZ));
@@ -152,7 +152,7 @@ static void hangcheck_fire(struct timer_list *unused)
152152

153153
static int __init hangcheck_init(void)
154154
{
155-
printk("Hangcheck: starting hangcheck timer %s (tick is %d seconds, margin is %d seconds).\n",
155+
pr_debug("Hangcheck: starting hangcheck timer %s (tick is %d seconds, margin is %d seconds).\n",
156156
VERSION_STR, hangcheck_tick, hangcheck_margin);
157157
hangcheck_tsc_margin =
158158
(unsigned long long)hangcheck_margin + hangcheck_tick;
@@ -168,7 +168,7 @@ static int __init hangcheck_init(void)
168168
static void __exit hangcheck_exit(void)
169169
{
170170
timer_delete_sync(&hangcheck_ticktock);
171-
printk("Hangcheck: Stopped hangcheck timer.\n");
171+
pr_debug("Hangcheck: Stopped hangcheck timer.\n");
172172
}
173173

174174
module_init(hangcheck_init);

0 commit comments

Comments
 (0)