The hrtimer code is interested whether the added timer is the first one to expire and whether the removed timer was the last one in the tree. The add/del routines have that information already. So we can return it right away instead of reevaluating it at the call site.
Showing the changes to include/linux/timerqueue.h (1 of 2 files). Show all
Unified · Split
| @@ -16,10 +16,10 @@ struct timerqueue_head { · 15 unmodified lines | ||
| 16 | 16 | }; |
| 17 | 17 | |
| 18 | 18 | |
| 19 | −extern void timerqueue_add(struct timerqueue_head *head, | |
| 20 | − struct timerqueue_node *node); | |
| 21 | −extern void timerqueue_del(struct timerqueue_head *head, | |
| 22 | − struct timerqueue_node *node); | |
| 19 | +extern bool timerqueue_add(struct timerqueue_head *head, | |
| 20 | + struct timerqueue_node *node); | |
| 21 | +extern bool timerqueue_del(struct timerqueue_head *head, | |
| 22 | + struct timerqueue_node *node); | |
| 23 | 23 | extern struct timerqueue_node *timerqueue_iterate_next( |
| 24 | 24 | struct timerqueue_node *node); |
| 25 | 25 | |