[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1346564722-14408-3-git-send-email-anton.vorontsov@linaro.org>
Date: Sat, 1 Sep 2012 22:45:21 -0700
From: Anton Vorontsov <anton.vorontsov@...aro.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Pekka Enberg <penberg@...nel.org>,
Leonid Moiseichuk <leonid.moiseichuk@...ia.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Colin Cross <ccross@...roid.com>,
Arve Hjønnevåg <arve@...roid.com>,
Davide Libenzi <davidel@...ilserver.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...e.hu>,
John Stultz <john.stultz@...aro.org>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linaro-kernel@...ts.linaro.org,
patches@...aro.org, kernel-team@...roid.com
Subject: [PATCH 3/4] timerfd: Factor out timer-type unspecific timerfd_expire()
There is nothing hrtimer-specific inside the timerfd_tmrproc(), except
the function prototype. We're about to add other timer types, so factor
out generic timerfd_expire() helper from timerfd_tmrproc().
Signed-off-by: Anton Vorontsov <anton.vorontsov@...aro.org>
---
fs/timerfd.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/timerfd.c b/fs/timerfd.c
index ecfb3f3..222db32 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -45,9 +45,8 @@ static DEFINE_SPINLOCK(cancel_lock);
* flag, but we do not re-arm the timer (in case it's necessary,
* tintv.tv64 != 0) until the timer is accessed.
*/
-static enum hrtimer_restart timerfd_tmrproc(struct hrtimer *htmr)
+static void timerfd_expire(struct timerfd_ctx *ctx)
{
- struct timerfd_ctx *ctx = container_of(htmr, struct timerfd_ctx, tmr);
unsigned long flags;
spin_lock_irqsave(&ctx->wqh.lock, flags);
@@ -56,6 +55,11 @@ static enum hrtimer_restart timerfd_tmrproc(struct hrtimer *htmr)
wake_up_locked(&ctx->wqh);
spin_unlock_irqrestore(&ctx->wqh.lock, flags);
+}
+
+static enum hrtimer_restart timerfd_tmrproc(struct hrtimer *htmr)
+{
+ timerfd_expire(container_of(htmr, struct timerfd_ctx, tmr));
return HRTIMER_NORESTART;
}
--
1.7.11.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists