diff options
| author | Boqun Feng <boqun@kernel.org> | 2026-08-04 09:14:30 -0700 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-08-10 10:50:19 +0200 |
| commit | ac4231a77973fc20808ed84c4af343eca2342d4b (patch) | |
| tree | 900f8684e4b1d5e89eea10bf311de369750063b6 /include/linux | |
| parent | 1b086687483371621e684e2a05b2bcd2cf07b634 (diff) | |
sched: Remove the unused preempt_offset parameter of __cant_sleep()
The preempt_offset is always 0 in all the callsites of __cant_sleep(),
hence remove it. It also allows us to clear up the code a bit by
no longer using a "preempt_count() > .." comparison.
Signed-off-by: Boqun Feng <boqun@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260804161447.84806-9-boqun@kernel.org
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kernel.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index e5570a16cbb1..24414c79e59a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -72,7 +72,7 @@ extern int dynamic_might_resched(void); #ifdef CONFIG_DEBUG_ATOMIC_SLEEP extern void __might_resched(const char *file, int line, unsigned int offsets); extern void __might_sleep(const char *file, int line); -extern void __cant_sleep(const char *file, int line, int preempt_offset); +extern void __cant_sleep(const char *file, int line); extern void __cant_migrate(const char *file, int line); /** @@ -95,7 +95,7 @@ extern void __cant_migrate(const char *file, int line); * this macro will print a stack trace if it is executed with preemption enabled */ # define cant_sleep() \ - do { __cant_sleep(__FILE__, __LINE__, 0); } while (0) + do { __cant_sleep(__FILE__, __LINE__); } while (0) # define sched_annotate_sleep() (current->task_state_change = 0) /** |
