From: tip-bot for Kees Cook <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, sfr@canb.auug.org.au, keescook@chromium.org,
tglx@linutronix.de, linux-kernel@vger.kernel.org,
mingo@kernel.org
Subject: [tip:timers/core] timer: Add parenthesis around timer_setup() macro arguments
Date: Wed, 1 Nov 2017 11:10:09 -0700 [thread overview]
Message-ID: <tip-00ed87da35e88a7a4d7f41673beab52ef828f12b@git.kernel.org> (raw)
In-Reply-To: <20171101143250.GA65266@beast>
Commit-ID: 00ed87da35e88a7a4d7f41673beab52ef828f12b
Gitweb: https://git.kernel.org/tip/00ed87da35e88a7a4d7f41673beab52ef828f12b
Author: Kees Cook <keescook@chromium.org>
AuthorDate: Wed, 1 Nov 2017 07:32:50 -0700
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 1 Nov 2017 19:05:05 +0100
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
---
include/linux/timer.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 0995048..a1af92b 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,
* 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) \
next prev parent reply other threads:[~2017-11-01 18:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 14:32 [PATCH] timer: Add parenthesis around timer_setup() macro arguments Kees Cook
2017-11-01 18:10 ` tip-bot for Kees Cook [this message]
2017-11-02 2:33 ` Stephen Rothwell
2017-11-02 3:04 ` Kees Cook
2017-11-02 3:40 ` Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-00ed87da35e88a7a4d7f41673beab52ef828f12b@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox