diff mbox

[RFC,11/12] drm/i915: Remove dead code

Message ID 1392969328-23133-12-git-send-email-thierry.reding@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thierry Reding Feb. 21, 2014, 7:55 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

The i915 driver sets DRIVER_GEM unconditionally, so testing for the
feature will always fail.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/i915/i915_gem_context.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Daniel Vetter March 4, 2014, 8:58 a.m. UTC | #1
On Fri, Feb 21, 2014 at 08:55:27AM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> The i915 driver sets DRIVER_GEM unconditionally, so testing for the
> feature will always fail.
> 
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_gem_context.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
> index e9bba3c29ec6..da74522f377d 100644
> --- a/drivers/gpu/drm/i915/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/i915_gem_context.c
> @@ -746,9 +746,6 @@ int i915_gem_context_create_ioctl(struct drm_device *dev, void *data,
>  	struct i915_hw_context *ctx;
>  	int ret;
>  
> -	if (!drm_core_check_feature(dev, DRIVER_GEM))
> -		return -ENODEV;
> -
>  	if (!HAS_HW_CONTEXTS(dev))
>  		return -ENODEV;
>  
> @@ -775,9 +772,6 @@ int i915_gem_context_destroy_ioctl(struct drm_device *dev, void *data,
>  	struct i915_hw_context *ctx;
>  	int ret;
>  
> -	if (!drm_core_check_feature(dev, DRIVER_GEM))
> -		return -ENODEV;
> -
>  	if (args->ctx_id == DEFAULT_CONTEXT_ID)
>  		return -ENOENT;
>  
> -- 
> 1.8.4.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index e9bba3c29ec6..da74522f377d 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -746,9 +746,6 @@  int i915_gem_context_create_ioctl(struct drm_device *dev, void *data,
 	struct i915_hw_context *ctx;
 	int ret;
 
-	if (!drm_core_check_feature(dev, DRIVER_GEM))
-		return -ENODEV;
-
 	if (!HAS_HW_CONTEXTS(dev))
 		return -ENODEV;
 
@@ -775,9 +772,6 @@  int i915_gem_context_destroy_ioctl(struct drm_device *dev, void *data,
 	struct i915_hw_context *ctx;
 	int ret;
 
-	if (!drm_core_check_feature(dev, DRIVER_GEM))
-		return -ENODEV;
-
 	if (args->ctx_id == DEFAULT_CONTEXT_ID)
 		return -ENOENT;