summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorAdam Guerin <adam.guerin@intel.com>2024-02-16 18:19:57 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2024-02-24 03:41:20 +0300
commitf99fb7d660f7c818105803f1f1915396a14d18ad (patch)
tree7e66b6623c3b49a9f804580c7ebeb188529d654a /tools/perf/scripts/python/task-analyzer.py
parent9a5dcada14d5e027856a1bc38443e54111438da6 (diff)
downloadlinux-f99fb7d660f7c818105803f1f1915396a14d18ad.tar.xz
crypto: qat - avoid division by zero
Check if delta_us is not zero and return -EINVAL if it is. delta_us is unlikely to be zero as there is a sleep between the reads of the two timestamps. This is to fix the following warning when compiling the QAT driver using clang scan-build: drivers/crypto/intel/qat/qat_common/adf_clock.c:87:9: warning: Division by zero [core.DivideZero] 87 | temp = DIV_ROUND_CLOSEST_ULL(temp, delta_us); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: e2980ba57e79 ("crypto: qat - add measure clock frequency") Signed-off-by: Adam Guerin <adam.guerin@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions