diff mbox

drm/i915: i915_gem_alloc_context_obj can be static

Message ID 1479896434-20696-1-git-send-email-tvrtko.ursulin@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tvrtko Ursulin Nov. 23, 2016, 10:20 a.m. UTC
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

It has only one call site from the same file.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h         | 2 --
 drivers/gpu/drm/i915/i915_gem_context.c | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

Comments

Chris Wilson Nov. 23, 2016, 10:34 a.m. UTC | #1
On Wed, Nov 23, 2016 at 10:20:34AM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> It has only one call site from the same file.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h         | 2 --
>  drivers/gpu/drm/i915/i915_gem_context.c | 2 +-
>  2 files changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 970e50bf9884..c44f2410f10f 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -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);
>  
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> index f82936a2fcce..7c1364801cfe 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -166,7 +166,7 @@ void i915_gem_context_free(struct kref *ctx_ref)
>  	kfree(ctx);
>  }
>  
> -struct drm_i915_gem_object *
> +static struct drm_i915_gem_object *
>  i915_gem_alloc_context_obj(struct drm_device *dev, size_t size)

Could we shrink it a bit so the caller fits onto one line?
alloc_context_obj?

And size_t is not the right type (u64 is overkill but matches the
interface and gcc should be fine).

Other than that, have a preemptive
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Tvrtko Ursulin Nov. 23, 2016, 2:26 p.m. UTC | #2
On 23/11/2016 11:15, Patchwork wrote:
> == Series Details ==
>
> Series: drm/i915: i915_gem_alloc_context_obj can be static (rev2)
> URL   : https://patchwork.freedesktop.org/series/15804/
> State : success
>
> == Summary ==
>
> Series 15804v2 drm/i915: i915_gem_alloc_context_obj can be static
> https://patchwork.freedesktop.org/api/1.0/series/15804/revisions/2/mbox/
>
>
> fi-bdw-5557u     total:244  pass:229  dwarn:0   dfail:0   fail:0   skip:15
> fi-bsw-n3050     total:244  pass:204  dwarn:0   dfail:0   fail:0   skip:40
> fi-bxt-t5700     total:244  pass:216  dwarn:0   dfail:0   fail:0   skip:28
> fi-byt-j1900     total:244  pass:216  dwarn:0   dfail:0   fail:0   skip:28
> fi-byt-n2820     total:244  pass:212  dwarn:0   dfail:0   fail:0   skip:32
> fi-hsw-4770      total:244  pass:224  dwarn:0   dfail:0   fail:0   skip:20
> fi-hsw-4770r     total:244  pass:224  dwarn:0   dfail:0   fail:0   skip:20
> fi-ilk-650       total:244  pass:191  dwarn:0   dfail:0   fail:0   skip:53
> fi-ivb-3520m     total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22
> fi-ivb-3770      total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22
> fi-kbl-7200u     total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22
> fi-skl-6260u     total:244  pass:230  dwarn:0   dfail:0   fail:0   skip:14
> fi-skl-6700hq    total:244  pass:223  dwarn:0   dfail:0   fail:0   skip:21
> fi-skl-6700k     total:244  pass:222  dwarn:1   dfail:0   fail:0   skip:21
> fi-skl-6770hq    total:244  pass:230  dwarn:0   dfail:0   fail:0   skip:14
> fi-snb-2520m     total:244  pass:212  dwarn:0   dfail:0   fail:0   skip:32
> fi-snb-2600      total:244  pass:211  dwarn:0   dfail:0   fail:0   skip:33
>
> d8db619985b5a8e4416ab78017ea9252e7f24689 drm-intel-nightly: 2016y-11m-23d-07h-34m-41s UTC integration manifest
> 0ff8a90 drm/i915: i915_gem_alloc_context_obj can be static

Pushed, thanks for the review!

Regards,

Tvrtko
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 970e50bf9884..c44f2410f10f 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -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);
 
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index f82936a2fcce..7c1364801cfe 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -166,7 +166,7 @@  void i915_gem_context_free(struct kref *ctx_ref)
 	kfree(ctx);
 }
 
-struct drm_i915_gem_object *
+static struct drm_i915_gem_object *
 i915_gem_alloc_context_obj(struct drm_device *dev, size_t size)
 {
 	struct drm_i915_gem_object *obj;