public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] intel: make sure VG_CLEAR() will always do memory clear
@ 2013-11-20  9:22 Zhenyu Wang
  2013-11-20 11:36 ` Damien Lespiau
  0 siblings, 1 reply; 5+ messages in thread
From: Zhenyu Wang @ 2013-11-20  9:22 UTC (permalink / raw)
  To: intel-gfx

If valgrind is not available, current VG_CLEAR() would just ignore
memory clear operation which might make invalid ioctl argument. So
make sure VG_CLEAR() will always clear memory.
---
 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..389f73a 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -74,7 +74,7 @@
 #define VG(x)
 #endif
 
-#define VG_CLEAR(s) VG(memset(&s, 0, sizeof(s)))
+#define VG_CLEAR(s) (memset(&s, 0, sizeof(s)))
 
 #define DBG(...) do {					\
 	if (bufmgr_gem->bufmgr.debug)			\
-- 
1.8.4.3

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

end of thread, other threads:[~2013-11-21  2:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-20  9:22 [PATCH] intel: make sure VG_CLEAR() will always do memory clear Zhenyu Wang
2013-11-20 11:36 ` Damien Lespiau
2013-11-20 15:53   ` Zhenyu Wang
2013-11-20 16:59     ` Damien Lespiau
2013-11-21  2:16       ` Zhenyu Wang

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