Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1642358

Re: [PATCH 2/2] gpu: drm: i915: compress logic into one line

From Daniel Vetter <daniel@ffwll.ch>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] gpu: drm: i915: compress logic into one line
Date 2017-05-16 11:40 +0200
Message-ID <tHH7s-3Qc-7@gated-at.bofh.it> (permalink)
References <tHwlI-5qg-29@gated-at.bofh.it> <tHwlI-5qg-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] gpu: drm: i915: compress logic into one line "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-05-16 00:10 +0200
  Re: [PATCH 2/2] gpu: drm: i915: compress logic into one line Daniel Vetter <daniel@ffwll.ch> - 2017-05-16 11:40 +0200

csiph-web