drm/i915: i915_gem_alloc_context_obj can be static
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 23 Nov 2016 10:49:15 +0000 (10:49 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 23 Nov 2016 14:23:00 +0000 (14:23 +0000)
It has only one call site from the same file.

v2: Also rename it to alloc_context_obj. (Chris Wilson)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1479898155-21014-1-git-send-email-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_context.c

index 970e50bf98840e6bc0ca5aa8ce88999c55b3131a..c44f2410f10fa65ffa4b3b2428a05e53a1e0f663 100644 (file)
@@ -3342,8 +3342,6 @@ struct i915_vma *
 i915_gem_context_pin_legacy(struct i915_gem_context *ctx,
                            unsigned int flags);
 void i915_gem_context_free(struct kref *ctx_ref);
-struct drm_i915_gem_object *
-i915_gem_alloc_context_obj(struct drm_device *dev, size_t size);
 struct i915_gem_context *
 i915_gem_context_create_gvt(struct drm_device *dev);
 
index f82936a2fccec4f5e0ff7a2df64c2b44d3c064de..a6add0c14045070946dc99266d1e785556694e2c 100644 (file)
@@ -166,8 +166,8 @@ void i915_gem_context_free(struct kref *ctx_ref)
        kfree(ctx);
 }
 
-struct drm_i915_gem_object *
-i915_gem_alloc_context_obj(struct drm_device *dev, size_t size)
+static struct drm_i915_gem_object *
+alloc_context_obj(struct drm_device *dev, u64 size)
 {
        struct drm_i915_gem_object *obj;
        int ret;
@@ -286,8 +286,7 @@ __create_hw_context(struct drm_device *dev,
                struct drm_i915_gem_object *obj;
                struct i915_vma *vma;
 
-               obj = i915_gem_alloc_context_obj(dev,
-                                                dev_priv->hw_context_size);
+               obj = alloc_context_obj(dev, dev_priv->hw_context_size);
                if (IS_ERR(obj)) {
                        ret = PTR_ERR(obj);
                        goto err_out;