PM: sleep: stats: Use array of suspend step names
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 29 Jan 2024 16:09:44 +0000 (17:09 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 5 Feb 2024 13:21:24 +0000 (14:21 +0100)
commitbc88528cda2eddc3e5ea304fc3f147f1b4186aa4
treeaa6aaf172f3bf7f95d8831e66178522dec89776f
parent9cb1c9820f960a4b100e7760cb3773f344e7ae35
PM: sleep: stats: Use array of suspend step names

Replace suspend_step_name() in the suspend statistics code with an array
of suspend step names which has fewer lines of code and less overhead.

While at it, remove two unnecessary line breaks in suspend_stats_show()
and adjust some white space in there to the kernel coding style for a
more consistent code layout.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
include/linux/suspend.h
kernel/power/main.c