mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3397c3cd85
commit
75d19e3686
@@ -126,23 +126,23 @@ static void hangcheck_fire(struct timer_list *unused)
|
|||||||
|
|
||||||
if (tsc_diff > hangcheck_tsc_margin) {
|
if (tsc_diff > hangcheck_tsc_margin) {
|
||||||
if (hangcheck_dump_tasks) {
|
if (hangcheck_dump_tasks) {
|
||||||
printk(KERN_CRIT "Hangcheck: Task state:\n");
|
pr_crit("Hangcheck: Task state:\n");
|
||||||
#ifdef CONFIG_MAGIC_SYSRQ
|
#ifdef CONFIG_MAGIC_SYSRQ
|
||||||
handle_sysrq('t');
|
handle_sysrq('t');
|
||||||
#endif /* CONFIG_MAGIC_SYSRQ */
|
#endif /* CONFIG_MAGIC_SYSRQ */
|
||||||
}
|
}
|
||||||
if (hangcheck_reboot) {
|
if (hangcheck_reboot) {
|
||||||
printk(KERN_CRIT "Hangcheck: hangcheck is restarting the machine.\n");
|
pr_crit("Hangcheck: hangcheck is restarting the machine.\n");
|
||||||
emergency_restart();
|
emergency_restart();
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_CRIT "Hangcheck: hangcheck value past margin!\n");
|
pr_crit("Hangcheck: hangcheck value past margin!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
/*
|
/*
|
||||||
* Enable to investigate delays in detail
|
* Enable to investigate delays in detail
|
||||||
*/
|
*/
|
||||||
printk("Hangcheck: called %Ld ns since last time (%Ld ns overshoot)\n",
|
pr_debug("Hangcheck: called %Ld ns since last time (%Ld ns overshoot)\n",
|
||||||
tsc_diff, tsc_diff - hangcheck_tick*TIMER_FREQ);
|
tsc_diff, tsc_diff - hangcheck_tick*TIMER_FREQ);
|
||||||
#endif
|
#endif
|
||||||
mod_timer(&hangcheck_ticktock, jiffies + (hangcheck_tick*HZ));
|
mod_timer(&hangcheck_ticktock, jiffies + (hangcheck_tick*HZ));
|
||||||
@@ -152,7 +152,7 @@ static void hangcheck_fire(struct timer_list *unused)
|
|||||||
|
|
||||||
static int __init hangcheck_init(void)
|
static int __init hangcheck_init(void)
|
||||||
{
|
{
|
||||||
printk("Hangcheck: starting hangcheck timer %s (tick is %d seconds, margin is %d seconds).\n",
|
pr_debug("Hangcheck: starting hangcheck timer %s (tick is %d seconds, margin is %d seconds).\n",
|
||||||
VERSION_STR, hangcheck_tick, hangcheck_margin);
|
VERSION_STR, hangcheck_tick, hangcheck_margin);
|
||||||
hangcheck_tsc_margin =
|
hangcheck_tsc_margin =
|
||||||
(unsigned long long)hangcheck_margin + hangcheck_tick;
|
(unsigned long long)hangcheck_margin + hangcheck_tick;
|
||||||
@@ -168,7 +168,7 @@ static int __init hangcheck_init(void)
|
|||||||
static void __exit hangcheck_exit(void)
|
static void __exit hangcheck_exit(void)
|
||||||
{
|
{
|
||||||
timer_delete_sync(&hangcheck_ticktock);
|
timer_delete_sync(&hangcheck_ticktock);
|
||||||
printk("Hangcheck: Stopped hangcheck timer.\n");
|
pr_debug("Hangcheck: Stopped hangcheck timer.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
module_init(hangcheck_init);
|
module_init(hangcheck_init);
|
||||||
|
|||||||
Reference in New Issue
Block a user