mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 23:50:53 +07:00
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
This commit is contained in:
parent
39c82caff8
commit
00ed87da35
@ -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) \
|
||||
|
Loading…
Reference in New Issue
Block a user