public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib: Silence Valgrind warning in synce_fence_status
@ 2019-06-27 12:55 Tvrtko Ursulin
  2019-06-27 13:06 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Tvrtko Ursulin @ 2019-06-27 12:55 UTC (permalink / raw)
  To: igt-dev; +Cc: Intel-gfx, Tvrtko Ursulin

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Let Valgrind know the ioctl initializes the passed in info block to reduce
the noise while debugging.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 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 <valgrind/valgrind.h>
+#include <valgrind/memcheck.h>
+
+#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;
 }
 
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-06-27 14:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-27 12:55 [igt-dev] [PATCH i-g-t] lib: Silence Valgrind warning in synce_fence_status Tvrtko Ursulin
2019-06-27 13:06 ` Chris Wilson
2019-06-27 13:59   ` Tvrtko Ursulin
2019-06-27 14:06     ` Chris Wilson
2019-06-27 13:59 ` [Intel-gfx] " Jani Nikula
2019-06-27 14:01   ` Tvrtko Ursulin
2019-06-27 14:01   ` [igt-dev] [Intel-gfx] " Chris Wilson
2019-06-27 14:04   ` [igt-dev] " Jani Nikula
2019-06-27 14:42 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox