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

Kamil Konieczny kamil.konieczny at linux.intel.com
Tue Jul 26 05:51:37 UTC 2022


On 2022-07-25 at 13:15:04 +0100, Adrian Larumbe wrote:
> 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);

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

>  		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