Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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) \