From: Tom St Denis Date: Mon, 8 Feb 2016 13:48:15 +0000 (-0500) Subject: drm/amdgpu/gfx7: Simplify bitmask creation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d3a7207bdbf5daeee962b376b807cab6778d0cbc;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu/gfx7: Simplify bitmask creation Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c index 2a8728cf793c..5e858ca43759 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c @@ -1598,13 +1598,7 @@ void gfx_v7_0_select_se_sh(struct amdgpu_device *adev, u32 se_num, u32 sh_num) */ static u32 gfx_v7_0_create_bitmask(u32 bit_width) { - u32 i, mask = 0; - - for (i = 0; i < bit_width; i++) { - mask <<= 1; - mask |= 1; - } - return mask; + return (u32)((1ULL<