From: Tom St Denis Date: Tue, 1 Dec 2015 16:48:32 +0000 (-0500) Subject: amdgpu/gfxv8: Simplification of gfx_v8_0_create_bitmask() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=544b8a74c72d39aebbbf482ccad8e7762a8b2a1e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git amdgpu/gfxv8: Simplification of gfx_v8_0_create_bitmask() Simplification of the function gfx_v8_0_create_bitmask(). Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 5c0400255f6d..b5396db0e6cb 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -2555,13 +2555,7 @@ static void gfx_v8_0_tiling_mode_table_init(struct amdgpu_device *adev) static u32 gfx_v8_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 << bit_width) - 1); } void gfx_v8_0_select_se_sh(struct amdgpu_device *adev, u32 se_num, u32 sh_num)