From 2d7d907ad17076b183ecf6e968839193360c55d2 Mon Sep 17 00:00:00 2001 From: Alexey Bozhenko Date: Fri, 15 Apr 2022 18:38:03 +0300 Subject: [PATCH] intel/compiler: fix singleton pointer coverity warning fix brw_kernel::stats member that was declared as a variable but used as a pointer to array of 3 elements CID: 1503279 Signed-off-by: Bozhenko Alexey Reviewed-by: Lionel Landwerlin Reviewed-by: Jason Ekstrand Part-of: --- src/intel/compiler/brw_kernel.c | 2 +- src/intel/compiler/brw_kernel.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_kernel.c b/src/intel/compiler/brw_kernel.c index fe4349877bd..5f2e6f37d31 100644 --- a/src/intel/compiler/brw_kernel.c +++ b/src/intel/compiler/brw_kernel.c @@ -454,7 +454,7 @@ brw_kernel_from_spirv(struct brw_compiler *compiler, .nir = nir, .key = &key, .prog_data = &kernel->prog_data, - .stats = &kernel->stats, + .stats = kernel->stats, .log_data = log_data, }; diff --git a/src/intel/compiler/brw_kernel.h b/src/intel/compiler/brw_kernel.h index 837dc57b4cd..b71b54b8666 100644 --- a/src/intel/compiler/brw_kernel.h +++ b/src/intel/compiler/brw_kernel.h @@ -49,7 +49,7 @@ struct brw_kernel_arg_desc { struct brw_kernel { struct brw_cs_prog_data prog_data; - struct brw_compile_stats stats; + struct brw_compile_stats stats[3]; uint16_t args_size; uint16_t arg_count;