diff options
author | Alex Waterman <alexw@nvidia.com> | 2018-05-18 13:54:20 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-24 07:37:48 -0400 |
commit | ee9d9b0cd2f645a3dae539909175ce29a262c8b6 (patch) | |
tree | 053ab5f50355f3ae58e29f39d37f569fd05b6e98 /drivers/Kconfig | |
parent | 2788943d3871cd84ada8cfe1dc56ce4f5a1ae6ab (diff) |
gpu: nvgpu: Cast unsigned arith to signed for abs()
Before passing in an unsigned value to abs() cast the result
of the subtraction to signed.
In Linux this happens automatically but on non-Linux platforms
abs() does not necessarily do this. clang flags this case as
a pointless operation: abs(x) obviously must equal x for any
unsigned x.
This change should hopefully preserve the Linux behavior but
avoid the compiler warning from clang.
JIRA NVGPU-525
Change-Id: I71320964c0922f1e4890c8b25d801f17e54ed3c0
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1724093
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/Kconfig')
0 files changed, 0 insertions, 0 deletions