summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom St Denis <tom.stdenis@amd.com>2016-02-08 16:48:15 +0300
committerAlex Deucher <alexander.deucher@amd.com>2016-02-12 23:27:46 +0300
commitd3a7207bdbf5daeee962b376b807cab6778d0cbc (patch)
treef9cfefceaecb952b435ac490a8ba174f46802bbc
parent840a20d31bbe366b4ff422e2320a9a12a5efc0b3 (diff)
downloadlinux-d3a7207bdbf5daeee962b376b807cab6778d0cbc.tar.xz
drm/amdgpu/gfx7: Simplify bitmask creation
Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c8
1 files changed, 1 insertions, 7 deletions
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<<bit_width)-1);
}
/**