We don't need to search past the first at level 0, since the * bucket range is 1; they're all the same. */
| 179 | /* We don't need to search past the first at level 0, since the |
| 180 | * bucket range is 1; they're all the same. */ |
| 181 | static const struct timer *find_first(const struct list_head *list, |
| 182 | unsigned int level, |
| 183 | const struct timer *prev) |
| 184 | { |
| 185 | struct timer *t; |
| 186 | |
| 187 | list_for_each(list, t, list) { |
| 188 | if (!prev || t->time < prev->time) |
| 189 | prev = t; |
| 190 | if (level == 0) |
| 191 | break; |
| 192 | } |
| 193 | return prev; |
| 194 | } |
| 195 | |
| 196 | /* Update level's first watermark, and return overall first. */ |
| 197 | static const struct timer *first_for_level(struct timers *timers, |
no outgoing calls
no test coverage detected