[Intel-gfx] [PATCH v2 01/14] drm: Pass 'name' to drm_crtc_init_with_planes()

Ville Syrjälä ville.syrjala at linux.intel.com
Wed Dec 9 04:01:44 PST 2015


On Wed, Dec 09, 2015 at 10:21:25AM +0200, Jani Nikula wrote:
> On Tue, 08 Dec 2015, ville.syrjala at linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> >
> > Done with coccinelle for the most part. However, it thinks '...' is
> > part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder
> > in its place and got rid of it with sed afterwards.
> >
> > I didn't convert drm_crtc_init() since passing the varargs through
> > would mean either cpp macros or va_list, and I figured we don't
> > care about these legacy functions enough to warrant the extra pain.
> 
> 
> > diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> > index 9f6e234e7029..468a14f266a7 100644
> > --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> > +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
> > @@ -344,7 +344,7 @@ int atmel_hlcdc_crtc_create(struct drm_device *dev)
> >  	ret = drm_crtc_init_with_planes(dev, &crtc->base,
> >  				&planes->primary->base,
> >  				planes->cursor ? &planes->cursor->base : NULL,
> > -				&atmel_hlcdc_crtc_funcs);
> > +				&atmel_hlcdc_crtc_funcs, NULL);
> >  	if (ret < 0)
> >  		goto fail;
> >  
> > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> > index 99e7efebedda..62306d336d0d 100644
> > --- a/drivers/gpu/drm/drm_crtc.c
> > +++ b/drivers/gpu/drm/drm_crtc.c
> > @@ -657,6 +657,7 @@ DEFINE_WW_CLASS(crtc_ww_class);
> >   * @primary: Primary plane for CRTC
> >   * @cursor: Cursor plane for CRTC
> >   * @funcs: callbacks for the new CRTC
> > + * @name: printf style format string for the CRTC name
> 
> Maybe add ", or NULL"? (Does kernel-doc support documenting varargs
> somehow?)

No clue.

> 
> Please add the appropriate __printf(x, y) annotation for the compiler
> above the declaration in drm_crtc.h.

I knew I forgot something. I'll respin the relevants patches.

> 
> The same for patches 1-3 in the series.
> 
> BR,
> Jani.
> 
> >   *
> >   * Inits a new object created as base part of a driver crtc object.
> >   *
> > @@ -666,7 +667,8 @@ DEFINE_WW_CLASS(crtc_ww_class);
> >  int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
> >  			      struct drm_plane *primary,
> >  			      struct drm_plane *cursor,
> > -			      const struct drm_crtc_funcs *funcs)
> > +			      const struct drm_crtc_funcs *funcs,
> > +			      const char *name, ...)
> >  {
> >  	struct drm_mode_config *config = &dev->mode_config;
> >  	int ret;
> 
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center

-- 
Ville Syrjälä
Intel OTC


More information about the Intel-gfx mailing list