All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Make intel_dsi_init() return void
Date: Wed, 28 May 2014 15:00:11 +0200	[thread overview]
Message-ID: <20140528130011.GS14841@phenom.ffwll.local> (raw)
In-Reply-To: <1401276656-28377-1-git-send-email-damien.lespiau@intel.com>

On Wed, May 28, 2014 at 12:30:56PM +0100, Damien Lespiau wrote:
> Functions that can't fail are such a bliss to work with, it'd be shame
> to miss the occasion. The "failure" mode is the DSI connector not being
> created, the rest of the initialization can carry on happily.
> 
> We weren't even checking that value anyway.
> 
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Suggested-by: Shobhit Kumar <shobhit.kumar@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Shobhit Kumar <shobhit.kumar@intel.com>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_drv.h |  2 +-
>  drivers/gpu/drm/i915/intel_dsi.c | 12 ++++++------
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index edecf89..62686b2 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -831,7 +831,7 @@ void intel_edp_psr_update(struct drm_device *dev);
>  void intel_dp_set_drrs_state(struct drm_device *dev, int refresh_rate);
>  
>  /* intel_dsi.c */
> -bool intel_dsi_init(struct drm_device *dev);
> +void intel_dsi_init(struct drm_device *dev);
>  
>  
>  /* intel_dvo.c */
> diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
> index e73bec6..4dbd160 100644
> --- a/drivers/gpu/drm/i915/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/intel_dsi.c
> @@ -646,7 +646,7 @@ static const struct drm_connector_funcs intel_dsi_connector_funcs = {
>  	.fill_modes = drm_helper_probe_single_connector_modes,
>  };
>  
> -bool intel_dsi_init(struct drm_device *dev)
> +void intel_dsi_init(struct drm_device *dev)
>  {
>  	struct intel_dsi *intel_dsi;
>  	struct intel_encoder *intel_encoder;
> @@ -662,12 +662,12 @@ bool intel_dsi_init(struct drm_device *dev)
>  
>  	intel_dsi = kzalloc(sizeof(*intel_dsi), GFP_KERNEL);
>  	if (!intel_dsi)
> -		return false;
> +		return;
>  
>  	intel_connector = kzalloc(sizeof(*intel_connector), GFP_KERNEL);
>  	if (!intel_connector) {
>  		kfree(intel_dsi);
> -		return false;
> +		return;
>  	}
>  
>  	intel_encoder = &intel_dsi->base;
> @@ -678,7 +678,7 @@ bool intel_dsi_init(struct drm_device *dev)
>  		dev_priv->mipi_mmio_base = VLV_MIPI_BASE;
>  	} else {
>  		DRM_ERROR("Unsupported Mipi device to reg base");
> -		return false;
> +		return;
>  	}
>  
>  	connector = &intel_connector->base;
> @@ -738,12 +738,12 @@ bool intel_dsi_init(struct drm_device *dev)
>  	fixed_mode->type |= DRM_MODE_TYPE_PREFERRED;
>  	intel_panel_init(&intel_connector->panel, fixed_mode, NULL);
>  
> -	return true;
> +	return;
>  
>  err:
>  	drm_encoder_cleanup(&intel_encoder->base);
>  	kfree(intel_dsi);
>  	kfree(intel_connector);
>  
> -	return false;
> +	return;
>  }
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2014-05-28 13:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-28 11:30 [PATCH] drm/i915: Make intel_dsi_init() return void Damien Lespiau
2014-05-28 13:00 ` Daniel Vetter [this message]
2014-06-03 12:05 ` Jani Nikula
2014-06-03 12:50   ` Damien Lespiau

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=20140528130011.GS14841@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=damien.lespiau@intel.com \
    --cc=intel-gfx@lists.freedesktop.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.