[PATCH 15/17] drm/atomic-helpers: functions for state duplicate/destroy/reset

Daniel Vetter daniel at ffwll.ch
Mon Nov 3 07:11:21 PST 2014


On Mon, Nov 03, 2014 at 03:06:07PM +0000, Daniel Thompson wrote:
> > kfree is a nop when the argument is NULL, which is a crucial property of
> > this - memset would oops on driver load.
> 
> Oops. Missed that (I think I misread who as assuming there was always
> obj->state in the patch header).
> 
> Do you fancy making the comment "by freeing the state pointer and
> allocating a new..." into "by freeing the state pointer (which may be
> NULL) and allocating a new...".
> 
> If nothing else that means the documentation is richer than the code...

Yeah, sounds like a good idea. I'll also mention that this is for driver
load mostly (if the driver doesn't decide to throw away the state for some
reason over suspend/resume).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list