[igt-dev] [RFC v1 16/20] xe_query: Add missing include.

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Oct 12 18:44:22 UTC 2023


Hi Francois,
On 2023-10-11 at 14:18:37 +0000, Francois Dugast wrote:

please remove dot from end of subject:
[RFC v1 16/20] xe_query: Add missing include.
--------------------------------------------^

Also this looks like a fix, imho send this as separate patch,
without RFC in it or at least move it to take 1 or before
build break. +cc Ashutosh

Regards,
Kamil

> From: Rodrigo Vivi <rodrigo.vivi at intel.com>
> 
> When trying to use xe_for_each_mem_region from a caller
> that is not importing the igt_aux.h, the following build issue
> will occur:
> 
> ../lib/xe/xe_query.h:76:38: error: implicit declaration of function ‘igt_fls’ [-Werror=implicit-function-declaration]
>    76 |         for (uint64_t __i = 0; __i < igt_fls(__memreg); __i++) \
> 
> So, to avoid a dependency chain, let's include from the file
> that is using the helper.
> 
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
>  lib/xe/xe_query.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/xe/xe_query.h b/lib/xe/xe_query.h
> index 8557bb4c5..dcdfa52c2 100644
> --- a/lib/xe/xe_query.h
> +++ b/lib/xe/xe_query.h
> @@ -11,6 +11,8 @@
>  
>  #include <stdint.h>
>  #include <xe_drm.h>
> +
> +#include "igt_aux.h"
>  #include "igt_list.h"
>  
>  #define SZ_4K	0x1000
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list