Skip to content

Commit 74de0ea

Browse files
pldrcalexdeucher
authored andcommitted
drm/amdgpu: fix bit shift logic
BIT_ULL(n) sets nth bit, remove explicit shift and set the position Fixes: a7a411e ("drm/amdgpu: fix shift-out-of-bounds in amdgpu_debugfs_jpeg_sched_mask_set") Signed-off-by: Sathishkumar S <[email protected]> Reviewed-by: Leo Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 6917112 commit 74de0ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ static int amdgpu_debugfs_jpeg_sched_mask_set(void *data, u64 val)
371371
for (i = 0; i < adev->jpeg.num_jpeg_inst; ++i) {
372372
for (j = 0; j < adev->jpeg.num_jpeg_rings; ++j) {
373373
ring = &adev->jpeg.inst[i].ring_dec[j];
374-
if (val & (BIT_ULL(1) << ((i * adev->jpeg.num_jpeg_rings) + j)))
374+
if (val & (BIT_ULL((i * adev->jpeg.num_jpeg_rings) + j)))
375375
ring->sched.ready = true;
376376
else
377377
ring->sched.ready = false;

0 commit comments

Comments
 (0)