diff options
author | Alex Waterman <alexw@nvidia.com> | 2018-03-12 18:46:22 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-04-05 14:24:09 -0400 |
commit | 43861331c5c9832a1f7c9ae6c96895a4253f250c (patch) | |
tree | 2011fc368a793b4d2862e96e7bb5ad62ebcb2ff5 /drivers/gpu/nvgpu/pmgr/pwrdev.c | |
parent | 182760476dbd1415ef9a6c0c33dba0adc4dde1ef (diff) |
gpu: nvgpu: Cast negative int to u32 before shift
A shift of a negative number is undefined; so to work around
said warning simply cast to a u32 first. In this case the
resulting operation should be ok since the sign bits are
maintained when the 32 bit negative integer is shifted into
a 24 bit negative integer.
JIRA NVGPU-525
Change-Id: I0a35b0ccbccbcf4ac1b0767acad75c082143429e
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1673826
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@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/gpu/nvgpu/pmgr/pwrdev.c')
0 files changed, 0 insertions, 0 deletions