All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [Intel-gfx] [patch] drm/i915: return false on failure in intel_dp_compute_config()
Date: Thu, 23 Feb 2017 11:20:19 +0000	[thread overview]
Message-ID: <20170223112019.GC4196@mwanda> (raw)
In-Reply-To: <1487848154.3052.40.camel@linux.intel.com>

On Thu, Feb 23, 2017 at 01:09:14PM +0200, Joonas Lahtinen wrote:
> On to, 2017-02-23 at 13:39 +0300, Dan Carpenter wrote:
> > This function is a bool type where we are supposed to return false on
> > failure and true on success.  Negative error codes are currently treated
> > as true.
> > 
> > Fixes: a1b2278e4dfc ("drm/i915: skylake panel fitting using shared scalers")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> <SNIP>
> 
> > 
> > @@ -1637,10 +1637,8 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> >  				       adjusted_mode);
> >  
> >  		if (INTEL_GEN(dev_priv) >= 9) {
> > -			int ret;
> > -			ret = skl_update_scaler_crtc(pipe_config);
> > -			if (ret)
> > -				return ret;
> > +			if (skl_update_scaler_crtc(pipe_config))
> > +				return false;
> >  		}
> 
> You can drop the braces, too.
> 

Multi-line indents get braces for readability.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [patch] drm/i915: return false on failure in intel_dp_compute_config()
Date: Thu, 23 Feb 2017 14:20:19 +0300	[thread overview]
Message-ID: <20170223112019.GC4196@mwanda> (raw)
In-Reply-To: <1487848154.3052.40.camel@linux.intel.com>

On Thu, Feb 23, 2017 at 01:09:14PM +0200, Joonas Lahtinen wrote:
> On to, 2017-02-23 at 13:39 +0300, Dan Carpenter wrote:
> > This function is a bool type where we are supposed to return false on
> > failure and true on success.  Negative error codes are currently treated
> > as true.
> > 
> > Fixes: a1b2278e4dfc ("drm/i915: skylake panel fitting using shared scalers")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> <SNIP>
> 
> > 
> > @@ -1637,10 +1637,8 @@ intel_dp_compute_config(struct intel_encoder *encoder,
> >  				       adjusted_mode);
> >  
> >  		if (INTEL_GEN(dev_priv) >= 9) {
> > -			int ret;
> > -			ret = skl_update_scaler_crtc(pipe_config);
> > -			if (ret)
> > -				return ret;
> > +			if (skl_update_scaler_crtc(pipe_config))
> > +				return false;
> >  		}
> 
> You can drop the braces, too.
> 

Multi-line indents get braces for readability.

regards,
dan carpenter

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-02-23 11:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-23 10:39 [patch] drm/i915: return false on failure in intel_dp_compute_config() Dan Carpenter
2017-02-23 10:39 ` Dan Carpenter
2017-02-23 11:09 ` [Intel-gfx] " Joonas Lahtinen
2017-02-23 11:09   ` Joonas Lahtinen
2017-02-23 11:20   ` Dan Carpenter [this message]
2017-02-23 11:20     ` Dan Carpenter

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=20170223112019.GC4196@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=kernel-janitors@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.