History

watchdog: Improve initialisation error message and documentation

The error message 'NMI watchdog failed to create perf event...' does not make it clear that this is a fatal error for the watchdog. It also currently prints the error value as a pointer, rather than extracting the error code with PTR_ERR(). Fix that. Add a note to the description of the 'nowatchdog' kernel parameter to associate it with this message.

Ben Hutchings committed 15 years ago

Commit 55142371 parent b518a642 files · +3 −2Browse files

Showing the changes to kernel (1 of 2 files). Show all

Unified · Split

kernel/watchdog.c+2−1
@@ -364,7 +364,8 @@ static int watchdog_nmi_enable(int cpu) · 363 unmodified lines
364 goto out_save;364 goto out_save;
365 }365 }
366 366
367 printk(KERN_ERR "NMI watchdog failed to create perf event on cpu%i: %p\n", cpu, event);367 printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n",
368 cpu, PTR_ERR(event));
368 return PTR_ERR(event);369 return PTR_ERR(event);
369 370
370 /* success path */371 /* success path */