summaryrefslogtreecommitdiff
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-09-23 19:54:38 +0300
committerPeter Zijlstra <peterz@infradead.org>2021-10-01 14:57:50 +0300
commit42a387566c567603bafa1ec0c5b71c35cba83e86 (patch)
tree084bea1dd5c9d4f7dde23dee93895bcfabb1df90 /include/linux/kernel.h
parent7b5ff4bb9adc53cfbf7ac9ba7820ccf0cd7c070a (diff)
downloadlinux-42a387566c567603bafa1ec0c5b71c35cba83e86.tar.xz
sched: Remove preempt_offset argument from __might_sleep()
All callers hand in 0 and never will hand in anything else. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20210923165358.054321586@linutronix.de
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 5e4ae54da73e..f95ee786e4ef 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -112,7 +112,7 @@ static __always_inline void might_resched(void)
#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
extern void __might_resched(const char *file, int line, int preempt_offset);
-extern void __might_sleep(const char *file, int line, int preempt_offset);
+extern void __might_sleep(const char *file, int line);
extern void __cant_sleep(const char *file, int line, int preempt_offset);
extern void __cant_migrate(const char *file, int line);
@@ -129,7 +129,7 @@ extern void __cant_migrate(const char *file, int line);
* supposed to.
*/
# define might_sleep() \
- do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0)
+ do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
/**
* cant_sleep - annotation for functions that cannot sleep
*
@@ -170,8 +170,7 @@ extern void __cant_migrate(const char *file, int line);
#else
static inline void __might_resched(const char *file, int line,
int preempt_offset) { }
- static inline void __might_sleep(const char *file, int line,
- int preempt_offset) { }
+static inline void __might_sleep(const char *file, int line) { }
# define might_sleep() do { might_resched(); } while (0)
# define cant_sleep() do { } while (0)
# define cant_migrate() do { } while (0)