intel: Use memset instead of VG_CLEAR
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 20 Nov 2013 16:32:14 +0000 (08:32 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 20 Nov 2013 19:55:07 +0000 (11:55 -0800)
The ioctl expects that certain fields will be zeroed, so we should allow
the helper function to actually work in non-Valgrind builds.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reported-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
intel/intel_bufmgr_gem.c

index df6fcec..c11ed45 100644 (file)
@@ -3033,7 +3033,7 @@ drm_intel_get_reset_stats(drm_intel_context *ctx,
        if (ctx == NULL)
                return -EINVAL;
 
-       VG_CLEAR(stats);
+       memset(&stats, 0, sizeof(stats));
 
        bufmgr_gem = (drm_intel_bufmgr_gem *)ctx->bufmgr;
        stats.ctx_id = ctx->ctx_id;