diff options
author | Simon Kagstrom <simon.kagstrom@netinsight.net> | 2009-12-23 05:08:18 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-28 04:50:13 -0500 |
commit | d894837f23f491aa7ed167aae767fc07cfe6e6e6 (patch) | |
tree | 33ee2a3526d3ed9889d385233c9f2feb4bdbc835 /include/linux/kernel.h | |
parent | 6b7b284958d47b77d06745b36bc7f36dab769d9b (diff) |
sched: might_sleep(): Make file parameter const char *
Fixes a warning when building with g++:
warning: deprecated conversion from string constant to 'char*'
And the file parameter use is constant, so mark it as such.
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Cc: peterz@infradead.org
LKML-Reference: <20091223110818.442d848e@marrow.netinsight.se>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 5 |
1 files changed, 3 insertions, 2 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 | ||