Re: [Mesa-dev] [PATCH] intel/compiler: Cast reg types explicitly

2017-08-26 Thread Pohjolainen, Topi
On Sat, Aug 26, 2017 at 02:21:44AM -0400, Matt Turner wrote:
> Kind of a stupid false-positive as far as Coverity goes, but
> 
> Reviewed-by: Matt Turner 

Yeah, I had mixed feelings writing the patch. Thanks!
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] intel/compiler: Cast reg types explicitly

2017-08-26 Thread Matt Turner
Kind of a stupid false-positive as far as Coverity goes, but

Reviewed-by: Matt Turner 
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] intel/compiler: Cast reg types explicitly

2017-08-25 Thread Topi Pohjolainen
Makes coverity happier.

CC: Matt Turner 
CID: 1416799
Fixes: c1ac1a3d25 (i965: Add a brw_hw_type_to_reg_type() function)

Signed-off-by: Topi Pohjolainen 
---
 src/intel/compiler/brw_reg_type.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/compiler/brw_reg_type.c 
b/src/intel/compiler/brw_reg_type.c
index a0f674f0d7..98c4cf7234 100644
--- a/src/intel/compiler/brw_reg_type.c
+++ b/src/intel/compiler/brw_reg_type.c
@@ -111,13 +111,13 @@ brw_hw_type_to_reg_type(const struct gen_device_info 
*devinfo,
 {
if (file == BRW_IMMEDIATE_VALUE) {
   for (enum brw_reg_type i = 0; i <= BRW_REGISTER_TYPE_LAST; i++) {
- if (gen4_hw_type[i].imm_type == hw_type) {
+ if (gen4_hw_type[i].imm_type == (enum hw_imm_type)hw_type) {
 return i;
  }
   }
} else {
   for (enum brw_reg_type i = 0; i <= BRW_REGISTER_TYPE_LAST; i++) {
- if (gen4_hw_type[i].reg_type == hw_type) {
+ if (gen4_hw_type[i].reg_type == (enum hw_reg_type)hw_type) {
 return i;
  }
   }
-- 
2.11.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev