Re: [Mesa-dev] [PATCH 06/12] i965: Add parentheses around usage of macro arguments

2017-09-29 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga 

On Thu, 2017-09-28 at 23:05 -0700, Matt Turner wrote:
> Otherwise I cannot use this macro in test_eu_validate.cpp
> ---
>  src/intel/common/gen_device_info.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/intel/common/gen_device_info.h
> b/src/intel/common/gen_device_info.h
> index ede4915e28..59b345e949 100644
> --- a/src/intel/common/gen_device_info.h
> +++ b/src/intel/common/gen_device_info.h
> @@ -193,7 +193,7 @@ struct gen_device_info
>  };
>  
>  #define gen_device_info_is_9lp(devinfo) \
> -   (devinfo->is_broxton || devinfo->is_geminilake)
> +   ((devinfo)->is_broxton || (devinfo)->is_geminilake)
>  
>  bool gen_get_device_info(int devid, struct gen_device_info
> *devinfo);
>  const char *gen_get_device_name(int devid);
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 06/12] i965: Add parentheses around usage of macro arguments

2017-09-29 Thread Matt Turner
Otherwise I cannot use this macro in test_eu_validate.cpp
---
 src/intel/common/gen_device_info.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/common/gen_device_info.h 
b/src/intel/common/gen_device_info.h
index ede4915e28..59b345e949 100644
--- a/src/intel/common/gen_device_info.h
+++ b/src/intel/common/gen_device_info.h
@@ -193,7 +193,7 @@ struct gen_device_info
 };
 
 #define gen_device_info_is_9lp(devinfo) \
-   (devinfo->is_broxton || devinfo->is_geminilake)
+   ((devinfo)->is_broxton || (devinfo)->is_geminilake)
 
 bool gen_get_device_info(int devid, struct gen_device_info *devinfo);
 const char *gen_get_device_name(int devid);
-- 
2.13.6

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