lkml.org 
[lkml]   [2015]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 37/39] staging: ozwpan: Remove hrtimer_active() check
hrtimer_cancel() can be called unconditionally and this code is hardly
a hotpath which wants to avoid the out of line call.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
drivers/staging/ozwpan/ozpd.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

Index: tip/drivers/staging/ozwpan/ozpd.c
===================================================================
--- tip.orig/drivers/staging/ozwpan/ozpd.c
+++ tip/drivers/staging/ozwpan/ozpd.c
@@ -175,10 +175,8 @@ static void oz_pd_free(struct work_struc
*/
void oz_pd_destroy(struct oz_pd *pd)
{
- if (hrtimer_active(&pd->timeout))
- hrtimer_cancel(&pd->timeout);
- if (hrtimer_active(&pd->heartbeat))
- hrtimer_cancel(&pd->heartbeat);
+ hrtimer_cancel(&pd->timeout);
+ hrtimer_cancel(&pd->heartbeat);

INIT_WORK(&pd->workitem, oz_pd_free);
if (!schedule_work(&pd->workitem))
@@ -247,7 +245,7 @@ void oz_pd_heartbeat(struct oz_pd *pd, u
more = 1;
}
}
- if ((!more) && (hrtimer_active(&pd->heartbeat)))
+ if (!more)
hrtimer_cancel(&pd->heartbeat);
if (pd->mode & OZ_F_ISOC_ANYTIME) {
int count = 8;



\
 
 \ /
  Last update: 2015-04-14 23:41    [W:0.599 / U:5.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site