From patchwork Wed Nov 20 16:38:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Romanick X-Patchwork-Id: 3213831 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CA2A2C045B for ; Wed, 20 Nov 2013 16:38:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 973A820760 for ; Wed, 20 Nov 2013 16:38:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 50B7C2075F for ; Wed, 20 Nov 2013 16:38:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3ABB2FB8FB; Wed, 20 Nov 2013 08:38:48 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from expn.cat.pdx.edu (expn.cat.pdx.edu [131.252.208.110]) by gabe.freedesktop.org (Postfix) with ESMTP id 28AF6FB90E; Wed, 20 Nov 2013 08:38:44 -0800 (PST) Received: from idr ([127.0.0.1])(authenticated bits=0) by expn.cat.pdx.edu (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id rAKGccJA001796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 20 Nov 2013 08:38:41 -0800 From: "Ian Romanick" To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Wed, 20 Nov 2013 08:38:38 -0800 Message-Id: <1384965518-4871-1-git-send-email-idr@freedesktop.org> X-Mailer: git-send-email 1.8.1.4 X-Virus-Scanned: clamav-milter 0.97.8 at expn X-Virus-Status: Clean Cc: Daniel Vetter , Ian Romanick Subject: [Intel-gfx] [PATCH] intel: Use memset instead of VG_CLEAR X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ian Romanick 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 Reported-by: Zhenyu Wang Cc: Damien Lespiau Cc: Daniel Vetter Reviewed-by: Daniel Vetter Reviewed-by: Damien Lespiau --- intel/intel_bufmgr_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index df6fcec..c11ed45 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -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;