[Intel-gfx] [PATCH] drm: squash lines for simple wrapper functions

Jani Nikula jani.nikula at linux.intel.com
Wed Sep 7 08:34:44 UTC 2016


On Wed, 07 Sep 2016, Masahiro Yamada <yamada.masahiro at socionext.com> wrote:
> Remove unneeded variables and assignments.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>

...

> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 95ddd56..59d029d 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1361,13 +1361,7 @@ void i915_driver_unload(struct drm_device *dev)
>  
>  static int i915_driver_open(struct drm_device *dev, struct drm_file *file)
>  {
> -	int ret;
> -
> -	ret = i915_gem_open(dev, file);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> +	return i915_gem_open(dev, file);
>  }

Seems to me the whole function could be replaced by a direct use of
i915_gem_open().

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center


More information about the Intel-gfx mailing list