All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: David Airlie <airlied@linux.ie>, dri-devel@lists.freedesktop.org
Cc: "Krzysztof Kozlowski" <k.kozlowski@samsung.com>,
	"Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Huang Rui" <ray.huang@amd.com>,
	"Eric Huang" <JinHuiEric.Huang@amd.com>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Flora Cui" <Flora.Cui@amd.com>,
	"Gustavo Padovan" <gustavo.padovan@collabora.co.uk>,
	"Tom St Denis" <tom.stdenis@amd.com>,
	"Dave Airlie" <airlied@redhat.com>,
	"Dan Carpenter" <dan.carpenter@oracle.com>,
	intel-gfx@lists.freedesktop.org,
	"Tomasz Figa" <tomasz.figa@chromium.com>,
	"Monk Liu" <Monk.Liu@amd.com>,
	linux-kernel@vger.kernel.org, "Samuel Li" <samuel.li@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Frediano Ziglio" <fziglio@redhat.com>
Subject: Re: [PATCH] drm: squash lines for simple wrapper functions
Date: Wed, 07 Sep 2016 11:34:44 +0300	[thread overview]
Message-ID: <8760q8xg4b.fsf@intel.com> (raw)
In-Reply-To: <1473203062-21731-1-git-send-email-yamada.masahiro@socionext.com>

On Wed, 07 Sep 2016, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> Remove unneeded variables and assignments.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org
Cc: "Masahiro Yamada" <yamada.masahiro@socionext.com>,
	"Gustavo Padovan" <gustavo.padovan@collabora.co.uk>,
	"Yakir Yang" <ykk@rock-chips.com>,
	"Huang Rui" <ray.huang@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Monk Liu" <Monk.Liu@amd.com>,
	"Chunming Zhou" <David1.Zhou@amd.com>,
	"Daniel Vetter" <daniel.vetter@intel.com>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Eric Huang" <JinHuiEric.Huang@amd.com>,
	"Flora Cui" <Flora.Cui@amd.com>,
	"Inki Dae" <inki.dae@samsung.com>,
	"Krzysztof Kozlowski" <k.kozlowski@samsung.com>,
	"Dave Airlie" <airlied@redhat.com>,
	intel-gfx@lists.freedesktop.org,
	"Frediano Ziglio" <fziglio@redhat.com>,
	"Samuel Li" <samuel.li@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Tomasz Figa" <tomasz.figa@chromium.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	linux-kernel@vger.kernel.org,
	"Tom St Denis" <tom.stdenis@amd.com>,
	"Dan Carpenter" <dan.carpenter@oracle.com>
Subject: Re: [PATCH] drm: squash lines for simple wrapper functions
Date: Wed, 07 Sep 2016 11:34:44 +0300	[thread overview]
Message-ID: <8760q8xg4b.fsf@intel.com> (raw)
In-Reply-To: <1473203062-21731-1-git-send-email-yamada.masahiro@socionext.com>

On Wed, 07 Sep 2016, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> Remove unneeded variables and assignments.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@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

  parent reply	other threads:[~2016-09-07  8:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 23:04 [PATCH] drm: squash lines for simple wrapper functions Masahiro Yamada
2016-09-06 23:04 ` Masahiro Yamada
2016-09-07  7:16 ` Christian König
2016-09-07  7:16   ` Christian König
2016-09-07  8:34 ` Jani Nikula [this message]
2016-09-07  8:34   ` Jani Nikula
2016-09-07 15:09   ` Masahiro Yamada
2016-09-07 15:09     ` Masahiro Yamada
2016-09-07  9:27 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-09-07 14:58 ` [PATCH] " Deucher, Alexander
2016-09-07 14:58   ` Deucher, Alexander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760q8xg4b.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=Flora.Cui@amd.com \
    --cc=JinHuiEric.Huang@amd.com \
    --cc=Monk.Liu@amd.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dan.carpenter@oracle.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fziglio@redhat.com \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray.huang@amd.com \
    --cc=samuel.li@amd.com \
    --cc=tom.stdenis@amd.com \
    --cc=tomasz.figa@chromium.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.