diff options
| author | Takashi Iwai <tiwai@suse.de> | 2016-09-30 18:40:40 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2016-09-30 18:40:40 +0200 |
| commit | eeea8b40cd2866ca24f25e5ef09225edb076ae45 (patch) | |
| tree | ece5b5287ee2ce53a841b66d0f526947f74d036f /kernel/time/timekeeping_debug.c | |
| parent | 3383c5c395386ac8e258b1a324c72ce850b84a9e (diff) | |
| parent | 513e43efafe329dad7b5794583b67ac898dcbdca (diff) | |
Merge tag 'asoc-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v4.9
Apart from the cleanups done by Morimoto-san this has very much been a
driver focused release with very little generic change:
- A big factoring out of the simple-card code to allow it to be shared
more with the rcar generic card from Kuninori Morimoto.
- Removal of some operations duplicated on the CODEC level, again by
Kuninori Morimoto.
- Lots more machine support for x86 systems.
- New drivers for Nuvoton NAU88C10, Realtek RT5660 and RT5663.
Diffstat (limited to 'kernel/time/timekeeping_debug.c')
| -rw-r--r-- | kernel/time/timekeeping_debug.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kernel/time/timekeeping_debug.c b/kernel/time/timekeeping_debug.c index f6bd65236712..107310a6f36f 100644 --- a/kernel/time/timekeeping_debug.c +++ b/kernel/time/timekeeping_debug.c @@ -23,7 +23,9 @@ #include "timekeeping_internal.h" -static unsigned int sleep_time_bin[32] = {0}; +#define NUM_BINS 32 + +static unsigned int sleep_time_bin[NUM_BINS] = {0}; static int tk_debug_show_sleep_time(struct seq_file *s, void *data) { @@ -69,6 +71,9 @@ late_initcall(tk_debug_sleep_time_init); void tk_debug_account_sleep_time(struct timespec64 *t) { - sleep_time_bin[fls(t->tv_sec)]++; + /* Cap bin index so we don't overflow the array */ + int bin = min(fls(t->tv_sec), NUM_BINS-1); + + sleep_time_bin[bin]++; } |
