diff options
author | Andy Shevchenko | 2019-03-04 10:29:08 +0100 |
---|---|---|
committer | Chris Wilson | 2019-03-20 18:50:35 +0100 |
commit | 6e514e371757a62996881e94dd2a488b3e16d518 (patch) | |
tree | 69aa3aa1261dbe4f37c7add4a7db68ac0d5ef94b /drivers/gpu/drm/i915/i915_gem_fence_reg.c | |
parent | drm/i915: Inline skl_update_pipe_wm() into its only caller (diff) | |
download | kernel-qcow2-linux-6e514e371757a62996881e94dd2a488b3e16d518.tar.gz kernel-qcow2-linux-6e514e371757a62996881e94dd2a488b3e16d518.tar.xz kernel-qcow2-linux-6e514e371757a62996881e94dd2a488b3e16d518.zip |
drm/i915: Switch to bitmap_zalloc()
Switch to bitmap_zalloc() to show clearly what we are allocating.
Besides that it returns pointer of bitmap type instead of opaque void *.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190304092908.57382-2-andriy.shevchenko@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_fence_reg.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_fence_reg.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_fence_reg.c b/drivers/gpu/drm/i915/i915_gem_fence_reg.c index 9418ad499b7e..3084f52e3372 100644 --- a/drivers/gpu/drm/i915/i915_gem_fence_reg.c +++ b/drivers/gpu/drm/i915/i915_gem_fence_reg.c @@ -765,8 +765,7 @@ i915_gem_object_save_bit_17_swizzle(struct drm_i915_gem_object *obj, int i; if (obj->bit_17 == NULL) { - obj->bit_17 = kcalloc(BITS_TO_LONGS(page_count), - sizeof(long), GFP_KERNEL); + obj->bit_17 = bitmap_zalloc(page_count, GFP_KERNEL); if (obj->bit_17 == NULL) { DRM_ERROR("Failed to allocate memory for bit 17 " "record\n"); |