Commit d3a7207b authored by Tom St Denis's avatar Tom St Denis Committed by Alex Deucher

drm/amdgpu/gfx7: Simplify bitmask creation

Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 840a20d3
...@@ -1598,13 +1598,7 @@ void gfx_v7_0_select_se_sh(struct amdgpu_device *adev, u32 se_num, u32 sh_num) ...@@ -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) static u32 gfx_v7_0_create_bitmask(u32 bit_width)
{ {
u32 i, mask = 0; return (u32)((1ULL<<bit_width)-1);
for (i = 0; i < bit_width; i++) {
mask <<= 1;
mask |= 1;
}
return mask;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment