Michel Hermier
2010-Dec-17 12:37 UTC
[Nouveau] libdrm: Make some kernel structures fully initialized
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. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-nouveau-initialise-kernel-request-structures.patch Type: application/octet-stream Size: 4356 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20101217/e2179735/attachment-0001.obj>
Xavier Chantry
2010-Dec-19 11:20 UTC
[Nouveau] libdrm: Make some kernel structures fully initialized
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.