aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorHarshit Mogalapalli <[email protected]>2023-05-22 07:30:15 +0000
committerAlex Deucher <[email protected]>2023-06-09 14:45:46 +0000
commit6dabce860d40703d7c27b71a120317f09293cf9c (patch)
tree6a555a47e86f7e25a96de958d85f4d69a19a589c /drivers/gpu/drm/amd/amdgpu
parentdrm/amdgpu: Fix a couple of spelling mistakes in info and debug messages (diff)
downloadkernel-6dabce860d40703d7c27b71a120317f09293cf9c.tar.gz
kernel-6dabce860d40703d7c27b71a120317f09293cf9c.zip
drm/amdgpu: Fix unsigned comparison with zero in gmc_v9_0_process_interrupt()
Smatch warns: drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:579: unsigned 'xcc_id' is never less than zero. gfx_v9_4_3_ih_to_xcc_inst() returns negative numbers as well. Fix this by changing type of xcc_id to int. Fixes: 98b2e9cad227 ("drm/amdgpu: correct the vmhub index when page fault occurs") Signed-off-by: Harshit Mogalapalli <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index f70e666cecf2..1e8b2aaa48c1 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -557,8 +557,8 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
const char *hub_name;
u64 addr;
uint32_t cam_index = 0;
- int ret;
- uint32_t node_id, xcc_id = 0;
+ int ret, xcc_id = 0;
+ uint32_t node_id;
node_id = entry->node_id;