Skip to content

Commit 5e8be76

Browse files
ZhongqiuHan-Qcomrafaeljw
authored andcommitted
PM: sleep: Drop superfluous might_sleep() calls
Drop superfluous might_sleep() calls from dpm_resume(), dpm_complete(), and dpm_prepare(). These functions already invoke primitives that implicitly check for sleep in atomic context: - dpm_resume() and dpm_complete() invoke mutex_lock(), which internally triggers might_sleep(). - dpm_prepare() calls wait_for_device_probe(), which internally uses flush_work(), and thus might_sleep(). These annotations are unnecessary and can be dropped to reduce clutter. Signed-off-by: Zhongqiu Han <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 4266e8f commit 5e8be76

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/base/power/main.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,6 @@ void dpm_resume(pm_message_t state)
10951095
ktime_t starttime = ktime_get();
10961096

10971097
trace_suspend_resume(TPS("dpm_resume"), state.event, true);
1098-
might_sleep();
10991098

11001099
pm_transition = state;
11011100
async_error = 0;
@@ -1198,7 +1197,6 @@ void dpm_complete(pm_message_t state)
11981197
struct list_head list;
11991198

12001199
trace_suspend_resume(TPS("dpm_complete"), state.event, true);
1201-
might_sleep();
12021200

12031201
INIT_LIST_HEAD(&list);
12041202
mutex_lock(&dpm_list_mtx);
@@ -2110,7 +2108,6 @@ int dpm_prepare(pm_message_t state)
21102108
int error = 0;
21112109

21122110
trace_suspend_resume(TPS("dpm_prepare"), state.event, true);
2113-
might_sleep();
21142111

21152112
/*
21162113
* Give a chance for the known devices to complete their probes, before

0 commit comments

Comments
 (0)