Skip to content

Commit f0050a3

Browse files
Zijun Hurafaeljw
authored andcommitted
PM: wakeup: Delete space in the end of string shown by pm_show_wakelocks()
pm_show_wakelocks() is called to generate a string when showing attributes /sys/power/wake_(lock|unlock), but the string ends with an unwanted space that was added back by mistake by commit c9d967b ("PM: wakeup: simplify the output logic of pm_show_wakelocks()"). Remove the unwanted space. Fixes: c9d967b ("PM: wakeup: simplify the output logic of pm_show_wakelocks()") Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com> Link: https://patch.msgid.link/20250505-fix_power-v1-1-0f7f2c2f338c@quicinc.com [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 228710e commit f0050a3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

kernel/power/wakelock.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ ssize_t pm_show_wakelocks(char *buf, bool show_active)
4949
len += sysfs_emit_at(buf, len, "%s ", wl->name);
5050
}
5151

52+
if (len > 0)
53+
--len;
54+
5255
len += sysfs_emit_at(buf, len, "\n");
5356

5457
mutex_unlock(&wakelocks_lock);

0 commit comments

Comments
 (0)