]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PM: hibernate: Rework message printing in swsusp_save()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 9 Oct 2025 19:34:16 +0000 (21:34 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 20 Oct 2025 18:43:09 +0000 (20:43 +0200)
commitd3db87f89c71c34f4a6a0ee9de3dfab5eee18b22
tree5fef257220b81b1f9f61a4ee16686f8e8dfdce64
parenta67818f74512452e9d99a98d990ea9d9b7c91791
PM: hibernate: Rework message printing in swsusp_save()

The messages printed by swsusp_save() are basically only useful for
debug, so printing them every time a hibernation image is created at
the "info" log level is not particularly useful.  Also printing a
message on a failing memory allocation is redundant.

Use pm_deferred_pr_dbg() for printing those messages so they will only
be printed when requested and the "deferred" variant is used because
this code runs in a deeply atomic context (one CPU with interrupts
off, no functional devices).  Also drop the useless message printed
when memory allocations fails.

While at it, extend one of the messages in question so it is less
cryptic.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ rjw: Dropped a useless colon at the end of one of the messages ]
Link: https://patch.msgid.link/10750389.nUPlyArG6x@rafael.j.wysocki
kernel/power/snapshot.c