drm/amd/pm: Fixes incorrect type in 'amdgpu_hwmon_show_power_avg() & _input()'
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Wed, 23 Aug 2023 01:33:32 +0000 (07:03 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Aug 2023 19:20:48 +0000 (15:20 -0400)
commitd1090194cb4b4bf7f4cfe01f85367580b19e50f6
tree36c2c424212ae99851a3e8c77e6a12e5af4c30c4
parenta5600853167aeba5cade81f184a382a0d1b14641
drm/amd/pm: Fixes incorrect type in 'amdgpu_hwmon_show_power_avg() & _input()'

The val is defined as unsigned int type, if(val<0) is invalid, hence
modified its type to ssize_t

Fixes the below:

drivers/gpu/drm/amd/pm/amdgpu_pm.c:2800:5-8: WARNING: Unsigned expression compared with zero: val < 0
drivers/gpu/drm/amd/pm/amdgpu_pm.c:2813:5-8: WARNING: Unsigned expression compared with zero: val < 0

Cc: Guchun Chen <guchun.chen@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c