aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorIan Abbott <[email protected]>2019-08-12 13:08:14 +0100
committerGreg Kroah-Hartman <[email protected]>2019-08-12 16:46:12 +0200
commit8e2a589a3fc36ce858d42e767c3bcd8fc62a512b (patch)
tree3d10e37d1c12e5d95c3ce89881991bd0d2ebe595 /tools/perf/util/trace-event-scripting.c
parentb4d98bc3fc93ec3a58459948a2c0e0c9b501cd88 (diff)
staging: comedi: dt3000: Fix rounding up of timer divisor
`dt3k_ns_to_timer()` determines the prescaler and divisor to use to produce a desired timing period. It is influenced by a rounding mode and can round the divisor up, down, or to the nearest value. However, the code for rounding up currently does the same as rounding down! Fix ir by using the `DIV_ROUND_UP()` macro to calculate the divisor when rounding up. Also, change the types of the `divider`, `base` and `prescale` variables from `int` to `unsigned int` to avoid mixing signed and unsigned types in the calculations. Also fix a typo in a nearby comment: "improvment" => "improvement". Signed-off-by: Ian Abbott <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions