diff options
| author | anarkia1976 <stefano.villa1976@gmail.com> | 2016-01-17 09:08:50 +0100 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-09-13 13:23:02 +0200 |
| commit | e804b73c195270afd1eb5654c10f6cf4a4f971f6 (patch) | |
| tree | f662268ac18cdba20e622fbd477b6e71bdee89de | |
| parent | 7e66a533ba6ef95027bed0cc77b11881fd0fb1e0 (diff) | |
| download | android_kernel_m2note-e804b73c195270afd1eb5654c10f6cf4a4f971f6.tar.gz | |
timer: optimize apply_slack()
__fls(mask) is equivalent to find_last_bit(&mask, BITS_PER_LONG), but cheaper
| -rw-r--r-- | kernel/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index f5bdb1b50..5245f4f9e 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -827,7 +827,7 @@ unsigned long apply_slack(struct timer_list *timer, unsigned long expires) if (mask == 0) return expires; - bit = find_last_bit(&mask, BITS_PER_LONG); + bit = __fls(mask); /* Round down by zero-ing the lower bits */ expires_limit = (expires_limit >> bit) << bit; |
