All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] gpu: drm: i915: compress logic into one line
Date: Tue, 16 May 2017 11:30:05 +0200	[thread overview]
Message-ID: <20170516093005.qd6oeyggqdchclw2@phenom.ffwll.local> (raw)
In-Reply-To: <20170515220028.GA15149@embeddedgus>

On Mon, May 15, 2017 at 05:00:28PM -0500, Gustavo A. R. Silva wrote:
> Simplify logic to avoid unnecessary variable declaration and assignment.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Both applied, thanks.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b13b53b..ca6479a 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9565,7 +9565,6 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc,
>  {
>  	struct drm_device *dev = crtc->base.dev;
>  	struct drm_i915_private *dev_priv = to_i915(dev);
> -	struct intel_shared_dpll *pll;
>  	const struct intel_limit *limit;
>  	int refclk = 120000;
>  
> @@ -9609,8 +9608,7 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc,
>  
>  	ironlake_compute_dpll(crtc, crtc_state, NULL);
>  
> -	pll = intel_get_shared_dpll(crtc, crtc_state, NULL);
> -	if (pll == NULL) {
> +	if (!intel_get_shared_dpll(crtc, crtc_state, NULL)) {
>  		DRM_DEBUG_DRIVER("failed to find PLL for pipe %c\n",
>  				 pipe_name(crtc->pipe));
>  		return -EINVAL;
> -- 
> 2.5.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 2/2] gpu: drm: i915: compress logic into one line
Date: Tue, 16 May 2017 11:30:05 +0200	[thread overview]
Message-ID: <20170516093005.qd6oeyggqdchclw2@phenom.ffwll.local> (raw)
In-Reply-To: <20170515220028.GA15149@embeddedgus>

On Mon, May 15, 2017 at 05:00:28PM -0500, Gustavo A. R. Silva wrote:
> Simplify logic to avoid unnecessary variable declaration and assignment.
> 
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>

Both applied, thanks.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index b13b53b..ca6479a 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9565,7 +9565,6 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc,
>  {
>  	struct drm_device *dev = crtc->base.dev;
>  	struct drm_i915_private *dev_priv = to_i915(dev);
> -	struct intel_shared_dpll *pll;
>  	const struct intel_limit *limit;
>  	int refclk = 120000;
>  
> @@ -9609,8 +9608,7 @@ static int ironlake_crtc_compute_clock(struct intel_crtc *crtc,
>  
>  	ironlake_compute_dpll(crtc, crtc_state, NULL);
>  
> -	pll = intel_get_shared_dpll(crtc, crtc_state, NULL);
> -	if (pll == NULL) {
> +	if (!intel_get_shared_dpll(crtc, crtc_state, NULL)) {
>  		DRM_DEBUG_DRIVER("failed to find PLL for pipe %c\n",
>  				 pipe_name(crtc->pipe));
>  		return -EINVAL;
> -- 
> 2.5.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-05-16  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 21:56 [PATCH 1/2] gpu: drm: i915: remove dead code Gustavo A. R. Silva
2017-05-15 22:00 ` [PATCH 2/2] gpu: drm: i915: compress logic into one line Gustavo A. R. Silva
2017-05-16  9:30   ` Daniel Vetter [this message]
2017-05-16  9:30     ` Daniel Vetter

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=20170516093005.qd6oeyggqdchclw2@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=garsilva@embeddedor.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.