diff mbox

drm/i915: Allocate the proper size for contexts.

Message ID 1352573764-22469-1-git-send-email-ben@bwidawsk.net (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Widawsky Nov. 10, 2012, 6:56 p.m. UTC
Whoops. This was fixed previously, but not sure how it got lost. It's
not needed for -fixes or stable because at the moment
drm_i915_file_private is way bigger than i915_hw_context (by 120 bytes
on my 64b build).

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_gem_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Vetter Nov. 10, 2012, 8:20 p.m. UTC | #1
On Sat, Nov 10, 2012 at 10:56:04AM -0800, Ben Widawsky wrote:
> Whoops. This was fixed previously, but not sure how it got lost. It's
> not needed for -fixes or stable because at the moment
> drm_i915_file_private is way bigger than i915_hw_context (by 120 bytes
> on my 64b build).
> 
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Oops. Queued for -next, thanks for the patch.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 05ed42f..0e510df 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -146,7 +146,7 @@  create_hw_context(struct drm_device *dev,
 	struct i915_hw_context *ctx;
 	int ret, id;
 
-	ctx = kzalloc(sizeof(struct drm_i915_file_private), GFP_KERNEL);
+	ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
 	if (ctx == NULL)
 		return ERR_PTR(-ENOMEM);