[igt-dev] [PATCH i-g-t] i915/gem_mmap: remove useless memset

Adrian Larumbe adrian.larumbe at collabora.com
Mon Jul 25 12:15:04 UTC 2022


Array 'expected' is never used again in a comparison after memset'ing it.
Remove the useless statement.

Signed-off-by: Adrian Larumbe <adrian.larumbe at collabora.com>
---
 tests/i915/gem_mmap.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/i915/gem_mmap.c b/tests/i915/gem_mmap.c
index 61f862a8e275..926cd03c577e 100644
--- a/tests/i915/gem_mmap.c
+++ b/tests/i915/gem_mmap.c
@@ -264,7 +264,6 @@ igt_main
 		igt_info("Testing coherency of writes and mmap reads.\n");
 		memset(buf, 0, sizeof(buf));
 		memset(buf + 1024, 0x01, 1024);
-		memset(expected + 1024, 0x01, 1024);
 		gem_write(fd, arg.handle, 0, buf, OBJECT_SIZE);
 		igt_assert(memcmp(buf, addr, sizeof(buf)) == 0);
 
-- 
2.37.0



More information about the igt-dev mailing list