From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Sebastian Siewior <bigeasy@linutronix.de>,
Anna-Maria Gleixner <anna-maria@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>,
Julia Cartwright <julia@ni.com>
Subject: [patch 4/7] posix-timers: Cleanup the flag/flags confusion
Date: Wed, 31 Jul 2019 00:33:52 +0200 [thread overview]
Message-ID: <20190730223828.782664411@linutronix.de> (raw)
In-Reply-To: 20190730223348.409366334@linutronix.de
do_timer_settime() has a 'flags' argument and uses 'flag' for the interrupt
flags, which is confusing at best.
Rename the argument so 'flags' can be used for interrupt flags as usual.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/time/posix-timers.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -844,13 +844,13 @@ int common_timer_set(struct k_itimer *ti
return 0;
}
-static int do_timer_settime(timer_t timer_id, int flags,
+static int do_timer_settime(timer_t timer_id, int tmr_flags,
struct itimerspec64 *new_spec64,
struct itimerspec64 *old_spec64)
{
const struct k_clock *kc;
struct k_itimer *timr;
- unsigned long flag;
+ unsigned long flags;
int error = 0;
if (!timespec64_valid(&new_spec64->it_interval) ||
@@ -860,7 +860,7 @@ static int do_timer_settime(timer_t time
if (old_spec64)
memset(old_spec64, 0, sizeof(*old_spec64));
retry:
- timr = lock_timer(timer_id, &flag);
+ timr = lock_timer(timer_id, &flags);
if (!timr)
return -EINVAL;
@@ -868,9 +868,9 @@ static int do_timer_settime(timer_t time
if (WARN_ON_ONCE(!kc || !kc->timer_set))
error = -EINVAL;
else
- error = kc->timer_set(timr, flags, new_spec64, old_spec64);
+ error = kc->timer_set(timr, tmr_flags, new_spec64, old_spec64);
- unlock_timer(timr, flag);
+ unlock_timer(timr, flags);
if (error == TIMER_RETRY) {
old_spec64 = NULL; // We already got the old time...
goto retry;
next prev parent reply other threads:[~2019-07-30 22:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 22:33 [patch 0/7] posix-timers: Prepare for PREEMPT_RT - part 1 Thomas Gleixner
2019-07-30 22:33 ` [patch 1/7] alarmtimer: Prepare for PREEMPT_RT Thomas Gleixner
2019-08-01 16:04 ` [tip:timers/core] " tip-bot for Anna-Maria Gleixner
2019-08-01 19:06 ` tip-bot for Anna-Maria Gleixner
2019-07-30 22:33 ` [patch 2/7] timerfd: " Thomas Gleixner
2019-08-01 16:04 ` [tip:timers/core] " tip-bot for Anna-Maria Gleixner
2019-08-01 19:07 ` tip-bot for Anna-Maria Gleixner
2019-07-30 22:33 ` [patch 3/7] itimers: " Thomas Gleixner
2019-08-01 16:05 ` [tip:timers/core] " tip-bot for Anna-Maria Gleixner
2019-08-01 19:07 ` tip-bot for Anna-Maria Gleixner
2019-07-30 22:33 ` Thomas Gleixner [this message]
2019-08-01 16:06 ` [tip:timers/core] posix-timers: Cleanup the flag/flags confusion tip-bot for Anna-Maria Gleixner
2019-08-01 19:08 ` tip-bot for Thomas Gleixner
2019-07-30 22:33 ` [patch 5/7] posix-timers: Rework cancel retry loops Thomas Gleixner
2019-08-01 16:07 ` [tip:timers/core] " tip-bot for Thomas Gleixner
2019-08-01 19:09 ` tip-bot for Thomas Gleixner
2019-07-30 22:33 ` [patch 6/7] posix-timers: Move rcu_head out of it union Thomas Gleixner
2019-08-01 16:08 ` [tip:timers/core] " tip-bot for Sebastian Andrzej Siewior
2019-08-01 19:09 ` tip-bot for Sebastian Andrzej Siewior
2019-07-30 22:33 ` [patch 7/7] posix-timers: Prepare for PREEMPT_RT Thomas Gleixner
2019-07-31 9:49 ` Peter Zijlstra
2019-07-31 11:03 ` Thomas Gleixner
2019-08-01 16:08 ` [tip:timers/core] " tip-bot for Thomas Gleixner
2019-08-01 19:10 ` tip-bot for Thomas Gleixner
2019-07-31 9:49 ` [patch 0/7] posix-timers: Prepare for PREEMPT_RT - part 1 Peter Zijlstra
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=20190730223828.782664411@linutronix.de \
--to=tglx@linutronix.de \
--cc=anna-maria@linutronix.de \
--cc=bigeasy@linutronix.de \
--cc=julia@ni.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/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