Commit 00ed87da authored by Kees Cook's avatar Kees Cook Committed by Thomas Gleixner

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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20171101143250.GA65266@beast
parent 39c82caf
......@@ -173,11 +173,12 @@ static inline void timer_setup_on_stack(struct timer_list *timer,
* do want to keep the inline for argument type checking, though.
*/
# define timer_setup(timer, callback, flags) \
__setup_timer(timer, (TIMER_FUNC_TYPE)callback, \
(TIMER_DATA_TYPE)timer, flags)
__setup_timer((timer), (TIMER_FUNC_TYPE)(callback), \
(TIMER_DATA_TYPE)(timer), (flags))
# define timer_setup_on_stack(timer, callback, flags) \
__setup_timer_on_stack(timer, (TIMER_FUNC_TYPE)callback,\
(TIMER_DATA_TYPE)timer, flags)
__setup_timer_on_stack((timer), \
(TIMER_FUNC_TYPE)(callback), \
(TIMER_DATA_TYPE)(timer), (flags))
#endif
#define from_timer(var, callback_timer, timer_fieldname) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment