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@xxxxxxxxxxxxxxx> > Suggested-by: Shobhit Kumar <shobhit.kumar@xxxxxxxxx> > Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > Cc: Shobhit Kumar <shobhit.kumar@xxxxxxxxx> > Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx