aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/kernel.h5
-rw-r--r--kernel/sched.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 3fc9f5aab5f8..785d7d1099d4 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -124,7 +124,7 @@ extern int _cond_resched(void);
124#endif 124#endif
125 125
126#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP 126#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
127 void __might_sleep(char *file, int line, int preempt_offset); 127 void __might_sleep(const char *file, int line, int preempt_offset);
128/** 128/**
129 * might_sleep - annotation for functions that can sleep 129 * might_sleep - annotation for functions that can sleep
130 * 130 *
@@ -138,7 +138,8 @@ extern int _cond_resched(void);
138# define might_sleep() \ 138# define might_sleep() \
139 do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) 139 do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0)
140#else 140#else
141 static inline void __might_sleep(char *file, int line, int preempt_offset) { } 141 static inline void __might_sleep(const char *file, int line,
142 int preempt_offset) { }
142# define might_sleep() do { might_resched(); } while (0) 143# define might_sleep() do { might_resched(); } while (0)
143#endif 144#endif
144 145
diff --git a/kernel/sched.c b/kernel/sched.c
index c535cc4f6428..64298a52eaa6 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -9694,7 +9694,7 @@ static inline int preempt_count_equals(int preempt_offset)
9694 return (nested == PREEMPT_INATOMIC_BASE + preempt_offset); 9694 return (nested == PREEMPT_INATOMIC_BASE + preempt_offset);
9695} 9695}
9696 9696
9697void __might_sleep(char *file, int line, int preempt_offset) 9697void __might_sleep(const char *file, int line, int preempt_offset)
9698{ 9698{
9699#ifdef in_atomic 9699#ifdef in_atomic
9700 static unsigned long prev_jiffy; /* ratelimiting */ 9700 static unsigned long prev_jiffy; /* ratelimiting */