No point in calling a function just to dereference a pointer.
Showing the changes to include/linux/timerqueue.h (1 of 2 files). Show all
Unified · Split
| @@ -20,10 +20,23 @@ extern void timerqueue_add(struct timerqueue_head *head, · 19 unmodified lines | ||
| 20 | 20 | struct timerqueue_node *node); |
| 21 | 21 | extern void timerqueue_del(struct timerqueue_head *head, |
| 22 | 22 | struct timerqueue_node *node); |
| 23 | −extern struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head); | |
| 24 | 23 | extern struct timerqueue_node *timerqueue_iterate_next( |
| 25 | 24 | struct timerqueue_node *node); |
| 26 | 25 | |
| 26 | +/** | |
| 27 | + * timerqueue_getnext - Returns the timer with the earlies expiration time | |
| 28 | + * | |
| 29 | + * @head: head of timerqueue | |
| 30 | + * | |
| 31 | + * Returns a pointer to the timer node that has the | |
| 32 | + * earliest expiration time. | |
| 33 | + */ | |
| 34 | +static inline | |
| 35 | +struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head) | |
| 36 | +{ | |
| 37 | + return head->next; | |
| 38 | +} | |
| 39 | + | |
| 27 | 40 | static inline void timerqueue_init(struct timerqueue_node *node) |
| 28 | 41 | { |
| 29 | 42 | RB_CLEAR_NODE(&node->node); |