diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-05-05 09:57:27 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-05-05 09:57:27 +0200 |
commit | e8c8ce54807b19e90ac84e609b13f7d4e337eab1 (patch) | |
tree | ae7d65ae17d55aee197b605ce1a193fe594af614 /kernel/locking/qspinlock_stat.h | |
parent | 5db4298133d99b3dfc60d6899ac9df169769c899 (diff) | |
parent | 04974df8049fc4240d22759a91e035082ccd18b4 (diff) | |
download | talos-op-linux-e8c8ce54807b19e90ac84e609b13f7d4e337eab1.tar.gz talos-op-linux-e8c8ce54807b19e90ac84e609b13f7d4e337eab1.zip |
Merge tag 'v4.6-rc6' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/locking/qspinlock_stat.h')
-rw-r--r-- | kernel/locking/qspinlock_stat.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/locking/qspinlock_stat.h b/kernel/locking/qspinlock_stat.h index eb2a2c9bc3fc..d734b7502001 100644 --- a/kernel/locking/qspinlock_stat.h +++ b/kernel/locking/qspinlock_stat.h @@ -136,10 +136,12 @@ static ssize_t qstat_read(struct file *file, char __user *user_buf, } if (counter == qstat_pv_hash_hops) { - u64 frac; + u64 frac = 0; - frac = 100ULL * do_div(stat, kicks); - frac = DIV_ROUND_CLOSEST_ULL(frac, kicks); + if (kicks) { + frac = 100ULL * do_div(stat, kicks); + frac = DIV_ROUND_CLOSEST_ULL(frac, kicks); + } /* * Return a X.XX decimal number |