diff options
| -rw-r--r-- | drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 8186f63474f4..6a2f3e50c714 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c | |||
| @@ -44,6 +44,7 @@ eb_create(int size) | |||
| 44 | { | 44 | { |
| 45 | struct eb_objects *eb; | 45 | struct eb_objects *eb; |
| 46 | int count = PAGE_SIZE / sizeof(struct hlist_head) / 2; | 46 | int count = PAGE_SIZE / sizeof(struct hlist_head) / 2; |
| 47 | BUILD_BUG_ON(!is_power_of_2(PAGE_SIZE / sizeof(struct hlist_head))); | ||
| 47 | while (count > size) | 48 | while (count > size) |
| 48 | count >>= 1; | 49 | count >>= 1; |
| 49 | eb = kzalloc(count*sizeof(struct hlist_head) + | 50 | eb = kzalloc(count*sizeof(struct hlist_head) + |
