Re: [PATCH 26/51] drm: Manage drm_mode_config_init with drmm_

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 29, 2020 at 12:11:28AM +0100, Daniel Vetter wrote:
> On Fri, Feb 28, 2020 at 9:26 PM Sam Ravnborg <sam@xxxxxxxxxxxx> wrote:
> > > @@ -312,7 +305,9 @@ void drm_minor_release(struct drm_minor *minor)
> > >   *           }
> > >   *           drmm_add_final_kfree(drm, priv);
> > >   *
> > > - *           drm_mode_config_init(drm);
> > > + *           ret = drm_mode_config_init(drm);
> > > + *           if (ret)
> > > + *                   return ret;
> > We do not print anything in drm_mode_config_init() - so should
> > we do it here?
> > Otherwise we only get the more generic error from the driver core.
> 
> I can add a printk to drm_mode_config if people feel like. But it's
> guaranteed dead code in reality, because of linux' small memory
> allocation guarantee. Small mallocs like this one here of just 2
> cachelines never fail (at least not with GFP_KERNEL).

To make this not quite pointless I decided to add debug output to
drmm_add_action and drm_kmalloc. I think there it's actually useful for
debugging. Will squash that into other patches.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux