[Intel-gfx] [RFC 2/3] drm: Register drmfs filesystem from drm init

sourab gupta sourab.gupta at intel.com
Thu Dec 1 08:41:36 UTC 2016


On Thu, 2016-12-01 at 00:15 -0800, Chris Wilson wrote:
> On Thu, Dec 01, 2016 at 12:32:32PM +0530, swati.dhingra at intel.com wrote:
> > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> > index 84fcfcb..ead360bd 100644
> > --- a/drivers/gpu/drm/drm_drv.c
> > +++ b/drivers/gpu/drm/drm_drv.c
> > @@ -688,6 +688,14 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
> >  {
> >  	int ret;
> >  
> > +#ifdef CONFIG_DRMFS
> 
> Rule of thumb: avoid #ifdeffry in the body of the code, use headers to
> hide conditional compilation.
Ok. Will do the requisite changes.
> 
> > +	dev->driver->drmfs_root = drmfs_create_dir(dev->driver->name, NULL);
> > +	if (IS_ERR(dev->driver->drmfs_root)) {
> > +		DRM_ERROR("Failed to get drmfs root dentry\n");
> > +		return PTR_ERR(dev->driver->drmfs_root);
> > +	}
> 
> Considering use of drmfs is optional, should an error here prevent the
> driver from loading?
> -Chris

Ok. Will remove the return on the error here.





More information about the Intel-gfx mailing list