[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8760q8xg4b.fsf@intel.com>
Date: Wed, 07 Sep 2016 11:34:44 +0300
From: Jani Nikula <jani.nikula@...ux.intel.com>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>,
David Airlie <airlied@...ux.ie>,
dri-devel@...ts.freedesktop.org
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>,
Gustavo Padovan <gustavo.padovan@...labora.co.uk>,
Yakir Yang <ykk@...k-chips.com>, Huang Rui <ray.huang@....com>,
Alex Deucher <alexander.deucher@....com>,
Monk Liu <Monk.Liu@....com>,
Chunming Zhou <David1.Zhou@....com>,
Daniel Vetter <daniel.vetter@...el.com>,
Heiko Stuebner <heiko@...ech.de>,
Eric Huang <JinHuiEric.Huang@....com>,
Flora Cui <Flora.Cui@....com>, Inki Dae <inki.dae@...sung.com>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Dave Airlie <airlied@...hat.com>,
intel-gfx@...ts.freedesktop.org,
Frediano Ziglio <fziglio@...hat.com>,
Samuel Li <samuel.li@....com>,
Christian König <christian.koenig@....com>,
Tomasz Figa <tomasz.figa@...omium.com>,
Sumit Semwal <sumit.semwal@...aro.org>,
linux-kernel@...r.kernel.org, Tom St Denis <tom.stdenis@....com>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH] drm: squash lines for simple wrapper functions
On Wed, 07 Sep 2016, Masahiro Yamada <yamada.masahiro@...ionext.com> wrote:
> Remove unneeded variables and assignments.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.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
Powered by blists - more mailing lists