[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0904061656500.20450@pc-004.diku.dk>
Date: Mon, 6 Apr 2009 16:58:06 +0200 (CEST)
From: Julia Lawall <julia@...u.dk>
To: tglx@...utronix.de, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH] kernel/hrtimer.c: use function hrtimer_is_queued
From: Julia Lawall <julia@...u.dk>
Use the hrtimer_is_queued function rather than an explicit bit-and for
testing timer->state, as done elsewhere.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@header@
@@
#include <linux/hrtimer.h>
@depends on header@
struct hrtimer *timer;
@@
- (timer->state & HRTIMER_STATE_ENQUEUED)
+ hrtimer_is_queued(timer)
// </smpl>
Signed-off-by: Julia Lawall <julia@...u.dk>
---
kernel/hrtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -u -p a/kernel/hrtimer.c b/kernel/hrtimer.c
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -850,7 +850,7 @@ static void __remove_hrtimer(struct hrti
struct hrtimer_clock_base *base,
unsigned long newstate, int reprogram)
{
- if (timer->state & HRTIMER_STATE_ENQUEUED) {
+ if (hrtimer_is_queued(timer)) {
/*
* Remove the timer from the rbtree and replace the
* first entry pointer if necessary.
--
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