diff options
author | 2016-06-22 17:17:21 +0530 | |
---|---|---|
committer | 2016-07-11 12:49:32 +0200 | |
commit | b979ed531468e9848d95a3b788dd8490927417e3 (patch) | |
tree | 5d0c61c54f8ef8f1f1d12942a56d1bac91c6fc7a /tools/perf/scripts/python/export-to-postgresql.py | |
parent | pwm: tegra: Allow 100 % duty cycle (diff) | |
download | wireguard-linux-b979ed531468e9848d95a3b788dd8490927417e3.tar.xz wireguard-linux-b979ed531468e9848d95a3b788dd8490927417e3.zip |
pwm: tegra: Avoid overflow when calculating duty cycle
duty_ns * (1 << PWM_DUTY_WIDTH) could overflow in integer calculation
when the PWM rate is low. Hence do all calculation on unsigned long long
to avoid overflow.
Signed-off-by: Hyong Bin Kim <hyongbink@nvidia.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions