From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752455AbdEPJaa (ORCPT ); Tue, 16 May 2017 05:30:30 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:32863 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751537AbdEPJaZ (ORCPT ); Tue, 16 May 2017 05:30:25 -0400 Date: Tue, 16 May 2017 11:30:05 +0200 From: Daniel Vetter To: "Gustavo A. R. Silva" Cc: Daniel Vetter , Jani Nikula , David Airlie , 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 Message-ID: <20170516093005.qd6oeyggqdchclw2@phenom.ffwll.local> Mail-Followup-To: "Gustavo A. R. Silva" , Daniel Vetter , Jani Nikula , David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20170515215605.GA14963@embeddedgus> <20170515220028.GA15149@embeddedgus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170515220028.GA15149@embeddedgus> X-Operating-System: Linux phenom 4.9.0-2-amd64 User-Agent: NeoMutt/20170306 (1.8.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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