[Nouveau] libdrm: Make some kernel structures fully initialized

Xavier Chantry chantry.xavier at gmail.com
Sun Dec 19 03:20:53 PST 2010


On Fri, Dec 17, 2010 at 1:37 PM, Michel Hermier
<michel.hermier at gmail.com> wrote:
> Hi,
> A patch that initialise kernel structures. In addition  to reduce the
> noise of valgrind when running piglit tests, it may be also
> interesting to have these structures fully initialised for the future
> in case of some kernel ioctrl changes.
>

If you send your patch inline (e.g. with git send-email), we can also
review inline which is practical.

Just one comment :
nouveau_bo.c: In function 'nouveau_bo_kalloc':
nouveau_bo.c:116:9: warning: missing braces around initializer
nouveau_bo.c:116:9: warning: (near initialization for 'req.info')

Thats because the first member of drm_nouveau_gem_new is another
structure : drm_nouveau_gem_info

This seems to work:
	struct drm_nouveau_gem_new req = { { 0 }, 0, 0 };

And we could also use memset.


More information about the Nouveau mailing list