From patchwork Thu Jun 27 12:55:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 11019671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3DAF313B4 for ; Thu, 27 Jun 2019 12:55:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1A63A219AC for ; Thu, 27 Jun 2019 12:55:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 07A4528A71; Thu, 27 Jun 2019 12:55:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,HK_RANDOM_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B757428787 for ; Thu, 27 Jun 2019 12:55:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DE7746E287; Thu, 27 Jun 2019 12:55:27 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id F2CFE6E21A; Thu, 27 Jun 2019 12:55:25 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jun 2019 05:55:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,423,1557212400"; d="scan'208";a="185257874" Received: from czwolak-mobl2.ger.corp.intel.com (HELO localhost.localdomain) ([10.252.4.8]) by fmsmga004.fm.intel.com with ESMTP; 27 Jun 2019 05:55:24 -0700 From: Tvrtko Ursulin To: igt-dev@lists.freedesktop.org Date: Thu, 27 Jun 2019 13:55:21 +0100 Message-Id: <20190627125521.10782-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] lib: Silence Valgrind warning in synce_fence_status X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin Let Valgrind know the ioctl initializes the passed in info block to reduce the noise while debugging. Signed-off-by: Tvrtko Ursulin --- lib/sw_sync.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/sw_sync.c b/lib/sw_sync.c index f208603312c2..73f3f7015d9d 100644 --- a/lib/sw_sync.c +++ b/lib/sw_sync.c @@ -41,6 +41,15 @@ #include "drmtest.h" #include "ioctl_wrappers.h" +#ifdef HAVE_VALGRIND +#include +#include + +#define VG(x) x +#else +#define VG(x) do {} while (0) +#endif + /** * SECTION:sw_sync * @short_description: Software sync (fencing) support library @@ -218,6 +227,8 @@ int sync_fence_status(int fence) if (file_info.num_fences != 1) return -EINVAL; + VG(VALGRIND_MAKE_MEM_DEFINED(&fence_info, sizeof(fence_info))); + return fence_info.status; }