aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/timer.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-11-01 10:32:50 -0400
committerThomas Gleixner <tglx@linutronix.de>2017-11-01 14:05:05 -0400
commit00ed87da35e88a7a4d7f41673beab52ef828f12b (patch)
treeed4e663905248d9c684b1aba69c8736cf3fafebe /include/linux/timer.h
parent39c82caff8610d57ffe32157cb3130dfabe12fbe (diff)
timer: Add parenthesis around timer_setup() macro arguments
In the case where expressions are passed as macro arguments, the LOCKDEP version of the timer macros need enclosing parenthesis. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lkml.kernel.org/r/20171101143250.GA65266@beast
Diffstat (limited to 'include/linux/timer.h')
-rw-r--r--include/linux/timer.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 09950482309b..a1af92bac0d5 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -173,11 +173,12 @@ static inline void timer_setup_on_stack(struct timer_list *timer,
173 * do want to keep the inline for argument type checking, though. 173 * do want to keep the inline for argument type checking, though.
174 */ 174 */
175# define timer_setup(timer, callback, flags) \ 175# define timer_setup(timer, callback, flags) \
176 __setup_timer(timer, (TIMER_FUNC_TYPE)callback, \ 176 __setup_timer((timer), (TIMER_FUNC_TYPE)(callback), \
177 (TIMER_DATA_TYPE)timer, flags) 177 (TIMER_DATA_TYPE)(timer), (flags))
178# define timer_setup_on_stack(timer, callback, flags) \ 178# define timer_setup_on_stack(timer, callback, flags) \
179 __setup_timer_on_stack(timer, (TIMER_FUNC_TYPE)callback,\ 179 __setup_timer_on_stack((timer), \
180 (TIMER_DATA_TYPE)timer, flags) 180 (TIMER_FUNC_TYPE)(callback), \
181 (TIMER_DATA_TYPE)(timer), (flags))
181#endif 182#endif
182 183
183#define from_timer(var, callback_timer, timer_fieldname) \ 184#define from_timer(var, callback_timer, timer_fieldname) \