All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: i915_gem_alloc_context_obj can be static
@ 2016-11-23 10:20 Tvrtko Ursulin
  2016-11-23 10:34 ` Chris Wilson
  2016-11-23 11:15 ` ✓ Fi.CI.BAT: success for drm/i915: i915_gem_alloc_context_obj can be static (rev2) Patchwork
  0 siblings, 2 replies; 5+ messages in thread
From: Tvrtko Ursulin @ 2016-11-23 10:20 UTC (permalink / raw)
  To: Intel-gfx

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)
 {
 	struct drm_i915_gem_object *obj;
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915: i915_gem_alloc_context_obj can be static
  2016-11-23 10:20 [PATCH] drm/i915: i915_gem_alloc_context_obj can be static Tvrtko Ursulin
@ 2016-11-23 10:34 ` Chris Wilson
  2016-11-23 10:49   ` [PATCH v2] " Tvrtko Ursulin
  2016-11-23 11:15 ` ✓ Fi.CI.BAT: success for drm/i915: i915_gem_alloc_context_obj can be static (rev2) Patchwork
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2016-11-23 10:34 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: Intel-gfx

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

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] drm/i915: i915_gem_alloc_context_obj can be static
  2016-11-23 10:34 ` Chris Wilson
@ 2016-11-23 10:49   ` Tvrtko Ursulin
  0 siblings, 0 replies; 5+ messages in thread
From: Tvrtko Ursulin @ 2016-11-23 10:49 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

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>
---
 drivers/gpu/drm/i915/i915_drv.h         | 2 --
 drivers/gpu/drm/i915/i915_gem_context.c | 7 +++----
 2 files changed, 3 insertions(+), 6 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..a6add0c14045 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -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;
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: i915_gem_alloc_context_obj can be static (rev2)
  2016-11-23 10:20 [PATCH] drm/i915: i915_gem_alloc_context_obj can be static Tvrtko Ursulin
  2016-11-23 10:34 ` Chris Wilson
@ 2016-11-23 11:15 ` Patchwork
  2016-11-23 14:26   ` Tvrtko Ursulin
  1 sibling, 1 reply; 5+ messages in thread
From: Patchwork @ 2016-11-23 11:15 UTC (permalink / raw)
  To: Tvrtko Ursulin; +Cc: intel-gfx

== 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

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3090/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ✓ Fi.CI.BAT: success for drm/i915: i915_gem_alloc_context_obj can be static (rev2)
  2016-11-23 11:15 ` ✓ Fi.CI.BAT: success for drm/i915: i915_gem_alloc_context_obj can be static (rev2) Patchwork
@ 2016-11-23 14:26   ` Tvrtko Ursulin
  0 siblings, 0 replies; 5+ messages in thread
From: Tvrtko Ursulin @ 2016-11-23 14:26 UTC (permalink / raw)
  To: intel-gfx, Tvrtko Ursulin


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


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-23 14:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-23 10:20 [PATCH] drm/i915: i915_gem_alloc_context_obj can be static Tvrtko Ursulin
2016-11-23 10:34 ` Chris Wilson
2016-11-23 10:49   ` [PATCH v2] " Tvrtko Ursulin
2016-11-23 11:15 ` ✓ Fi.CI.BAT: success for drm/i915: i915_gem_alloc_context_obj can be static (rev2) Patchwork
2016-11-23 14:26   ` Tvrtko Ursulin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.